Adobe Flash CS5.5 and AS3 – Click event from frame 1 that calls frame 2 causes click event in frame 2 to fire also

If you compile your game with Flash Player 9 (Publish Settings), this is not an issue. When the Flash Player is set to 10 and above is when propagation occurs.

To prevent this from happening, add the following code…

event.stopPropagation();

…to the top of the function that handles your first click event. This will stop propagation of the next click in the subsequent frame.

Related API Elements

flash.events.Event.stopImmediatePropagation()

flash.events.Event.preventDefault()

Leave a Reply