I got random picture that I want to rotate it (motion tween) for 180º with MOUSE_OVER event. I have another function that returns the picture -180º with MOUSE_OUT event. The problem is when the MOUSE_OUT event triggers while the MOUSE_OVER event is still active.
stop();
sClock.addEventListener(MouseEvent.MOUSE_OVER, Frwrd);
sClock.addEventListener(MouseEvent.MOUSE_OUT, Bck);
function Frwrd(event:MouseEvent):void
{
this.gotoAndPlay("2");
}
function Bck(event:MouseEvent):void
{
this.gotoAndPlay("21");
}
If I use the labels of the frames, instead of "2" and "21", it's even weirder.
stop();
sClock.addEventListener(MouseEvent.MOUSE_OVER, Frwrd);
sClock.addEventListener(MouseEvent.MOUSE_OUT, Bck);
function Frwrd(event:MouseEvent):void
{
this.gotoAndPlay("RotationStart");
}
function Bck(event:MouseEvent):void
{
this.gotoAndPlay("RotationEnd");