我有带有mouse_over,mouse_out和CLICK事件的按钮。但是当我点击按钮时,它将我带到另一个框架,并尝试触发mouse_out事件。我如何阻止这种情况发生?当鼠标点击触发时,如何停止mouse_out触发
act1_btn.addEventListener(MouseEvent.CLICK,act1Pressed);
act1_btn.addEventListener(MouseEvent.MOUSE_OVER,act1Over); act1_btn.addEventListener(MouseEvent.MOUSE_OUT,act1Out); act1_btn.addEventListener(Event.ENTER_FRAME,act1EnterFrame);
function act1Over(e:MouseEvent):void { trace(“over”); act1Animating = true; logo_1.visible = true; bubble.visible = true; txt1.visible = true; }
function act1Out(e:MouseEvent):void { act1Animating = false; logo_1.visible = false; bubble.visible = false; txt1.visible = false; }
功能act1EnterFrame(E:事件):无效 { 如果(act1Animating & & e.target.scaleY < 1.1) { e.target.scaleY + = 0.02; e.target.scaleX + = 0.02;
}
如果(act1Animating & & e.target.scaleY> 1!) { e.target.scaleY - = 0.02; e.target.scaleX - = 0.02; } }
功能act1Pressed(E:MouseEvent)方法:无效 { 迹( “点击”); act1Animating = false; logo_1.visible = false; bubble.visible = false; txt1.visible = false; gotoAndStop(2); }
非常感谢你 – 2010-10-18 08:19:30