ActionScript - MouseOut Event
-
18-09-2019 - |
Question
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.
Solution
maybe since you are using weak references (the 3rd parameter), the object is garbagecollected before the MOUSE_OUT.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow