tengo este codigo para el cursor personalizado:
Código :
var RAD_DEG:Number = 180/Math.PI;
Mouse.hide();
_root.createEmptyMovieClip("mouser", 1);
mouser.attachMovie("fly", "fly", 1);
mouser._x = _xmouse;
mouser._y = _ymouse;
mouser.oldY = mouser._y;
mouser.oldX = mouser._x;
mouser.startDrag(true);
mouser.onMouseMove = movement;
function movement() {
mouser.dirX = mouser.oldX-mouser._x;
mouser.dirY = mouser.oldY-mouser._y;
mouser.oldX = mouser._x;
mouser.oldY = mouser._y;
myAngle = Math.atan2(mouser.dirY, mouser.dirX)*RAD_DEG;
errorAngle = myAngle - mouser._rotation;
if(Math.abs(errorAngle) > 5){
if(((errorAngle > 0) && (errorAngle < 180)) || (errorAngle < -180)){
mouser._rotation += 5;
} else {
mouser._rotation -= 5;
}
}
updateAfterEvent();
}
flash.display.BitmapDatay este para el scrollbar
Código :
function FNSCROLL(){
if(this.scrollText != undefined ){
if(this.scrollText.maxscroll==1){
if(this._visible) this._visible=false;
}
else{
if(!this._visible)this._visible=true;
}
this.slyder.clear();
this.slyder.lineStyle(1,0xFAC18A,100);
this.slyder.moveTo(0,0);
this.slyder.lineTo(0,this.scrollText._height-1);
this.rectwrapper._y=this.scrollText._height-this.rectwrapper._height;
if(this.pressUp){
if(this.scrollText.scroll>0){
this.scrollText.scroll-=1;
this.dragger._y = 10+int( (this.scrollText._height-30)*(this.scrollText.scroll-1) / this.scrollText.maxscroll );
}
}
if(this.pressDown){
if(this.scrollText.scroll<this.scrollText.maxscroll){
this.scrollText.scroll+=1;
this.dragger._y = 10+int( (this.scrollText._height-30)*(this.scrollText.scroll-1) / this.scrollText.maxscroll );
}
}
if(this.dragging){
var loc = this.dragger._y;
var yDragged = loc-10;
var newScroll = this.scrollText.maxscroll*yDragged/(this.scrollText._height-30);
this.scrollText.scroll=1+int(newScroll);
}
}
}y este sobre el dragger del scroll:
Código :
on(press){
this._parent.dragging=true;
startDrag( this, true, this._x, 10, this._x, this._parent.scrollText._height-20);
}
on(release, releaseOutside){
this._parent.dragging=false;
stopDrag();
}
on (rollOver) {
_root.mouser.fly.gotoAndPlay(2);
}
on (rollOut) {
_root.mouser.fly.gotoAndStop(1);
}
on (dragOut) {
_root.mouser.fly.gotoAndStop(1);
}No se si esto sea relavante, pero este codigo esta sobre el scroll
Código :
onClipEvent(load){
this.scrollText=_level0.myText4;
this.onEnterFrame=_level0.FNSCROLL;
}Espero que lo que he escrito no sea muy confuso para poder solucionar este embrollo en el que me he metido.
