I’m currently working on a game where I have a movieclip that rotates based on _xmouse.
this.onEnterFrame = function() {
//Mouse
__________________________________;
Mouse.hide();
__________________________________;
this.shooter._rotation = 0;
this._xmouse = 100
if (this.shooter._rotation>-90 & this.shooter._rotation<90) {
this.shooter._rotation += _root._xmouse/2;
} else if (this.shooter._rotation<-90 & this.shooter._rotation>90) {
this.shooter._rotation = _root._xmouse/2;
}
};
mouse this allows the rotation to follow the mouse, but I can’t figure out how to set limitations for it. The min value should be -90 and the max should be 90.
Thanks for those who help me.