ActionScript - MouseOut 事件
我正在尝试让影片剪辑正常播放。 MouseOver 的第一部分工作正常,但 MouseOut 没有得到响应。
这是代码:
stop();
callout_btn.addEventListener(MouseEvent.MOUSE_OVER, playCallout, false, 0, true);
callout_btn.addEventListener(MouseEvent.MOUSE_OUT, resetCallout, false, 0, true);
function playCallout(evt:MouseEvent):void {
trace("Moused Over Callout Button");
play();
}
function resetCallout(evt:MouseEvent):void {
trace("Mouse has moved off button");
gotoAndStop(1);
}
任何帮助将不胜感激。谢谢。
I am trying to get a movie clip to play properly. The first part with MouseOver works fine, but the MouseOut doesn't get a response.
Here's the code:
stop();
callout_btn.addEventListener(MouseEvent.MOUSE_OVER, playCallout, false, 0, true);
callout_btn.addEventListener(MouseEvent.MOUSE_OUT, resetCallout, false, 0, true);
function playCallout(evt:MouseEvent):void {
trace("Moused Over Callout Button");
play();
}
function resetCallout(evt:MouseEvent):void {
trace("Mouse has moved off button");
gotoAndStop(1);
}
Any help would be appreciated. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许因为您使用的是弱引用(第三个参数),所以该对象在 MOUSE_OUT 之前被垃圾收集。
maybe since you are using weak references (the 3rd parameter), the object is garbagecollected before the MOUSE_OUT.