actionscript 3 - Detect mouseUp on stage -
Is there a way to check this method that is linked to the forum?
I have a platform as global. And some object on mouseup needs fire to function ... now it depends on 2 or 3 how many objects I add .. < / P>
I want something ..
($ .Stage.hasEventListener (MouseEvent.MOUSE_UP, this.mouseUp) === Incorrect) {$ .stage.addEventListener (MouseEvent.MOUSE_UP, This.mouseUp); }
Or a better way of handling it?
I'm guessing you are adding the listener to each object, do not you? This means that every time you make an example of your object that you are adding another listener to the stage mouse up event. If you really only want a listener for this type of event, take him out of the realm of the object and only add the listener once.
Comments
Post a Comment