0
我得到隨機圖片,我想用MOUSE_OVER事件將它旋轉180度(補間動畫)180º。我有另一個函數返回圖片-180º與MOUSE_OUT事件。問題是MOUSE_OUT事件在MOUSE_OVER事件仍處於活動狀態時觸發。鼠標事件重置
而不是「2」和「21」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");
}
如果我使用的幀的標籤,它甚至怪異。
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");