2 Replies Latest reply on Oct 30, 2007 3:30 PM by mondomaniatrics

    AS 3.0 Bug found: MouseEvent does not register?

      I think I may have found a bug in Actionscript 3.0.

      If a display object is a child of another display object, such as a Sprite object inside another Sprite object, then MouseEvents such as MouseEvent.CLICK, and MouseEvent.MOUSE_DOWN that are attached to the inner display object do not register every time they should be dispatched. A 'dead click' occurs every other time.

      For example, in my current game I have a sprite container called gameElements where all interactive game elements are added. The GameElements container is added to the display list of the root. Any game element I add to the gameElements display list would not perform they're MouseEvent Listener function when I click on them. However, if I simply add the game element to the root display list, MouseEvents like MouseEvent.CLICK and MouseEvent.MOUSE_DOWN fire correctly every time they're dispatched.

      Does this make sense? Has anyone had any experience with this? Does anyone know how to fix this? I would prefer to use my Game.gameElements display list structure.