Hello i try to change this code.
var RAD_DEG:Number = 180/Math.PI; // Variable to convert radians to degrees
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);
// MONITOR THE SPEED AND DIRECTION OF THE MOVIE
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;
// Calculate the angle of the mc based on the direction of movement
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();
}
The trouble is this, i have another starDrag in a scrollbar when i used tow times the personalize mouse doesn’t work. But i know i change the starDrag for onMouseMove, this work the trouble i don’t know who do this work.
An sorry for my bad english.