views:

172

answers:

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.

A: 

maybe since you are using weak references (the 3rd parameter), the object is garbagecollected before the MOUSE_OUT.

kajyr
What do you recommend as a solution?
fmz
leaving out the last parameter; or setting it to false (it's the same)callout_btn.addEventListener(MouseEvent.MOUSE_OVER, playCallout, false, 0);
kajyr
err i picked the wrong one to example:callout_btn.addEventListener(MouseEvent.MOUSE_OUT, resetCallout);btw since the last three parameters are the default ones, you can skip them.
kajyr
Hi. It is still not working. I will post it on Monday so you can see and then hopefully I can get it fixed. Thanks.
fmz