If the mouse is over an object before and while a MOUSE_OVER event is registered, does it trigger? I ask this because it appears that it doesn’t in my program, and I want to know if this is a universal behavior of all MOUSE_OVER events. Is there a way around this?
I’m gonna avoid giving a code example here, because my program is large and complicated.
The
MOUSE_OVERevent will dispatch whenever the cursor enters the bounds of any interactiveDisplayObject, such as aSpriteorMovieClip; this includes any of its children (seeROLL_OVERif you wish to ignore children).As well, the event will dispatch in cases where an object is added to the stage and currently happens to be under the cursor.
It is important to make sure that your event listener has been registered before the Flash Player has dispatched the event — system events are not queued beyond a single frame, and thus no handlers will be invoked for previous activity.