Código :
movieclip.prototype.mouser = function(rot) {
this.q++;
rotation = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x)*180/3.141593-90;
this.button.onPress = function() {
down = true;
if (_root._ymouse<=this._y) {
above = true;
} else {
above = false;
}
// end if
};
this.button.onRelease = function() {
down = false;
};
this.button.onReleaseOutside = function() {
down = false;
};
if (down) {
if (above) {
this._rotation = rotation;
} else {
this._rotation = rotation-180;
}
// end if
} else {
inertia = 0.900000;
speed = 0.080000;
diff = -this._rotation+rot;
change = change*inertia+diff*speed;
this._rotation = this._rotation+change;
}
// end if
};
