2 Replies Latest reply: Jun 9, 2014 5:56 AM by rahex RSS

    clicking several elements of the same instance

    rahex Community Member

      Hi,

      I have code which adds (using a Timer) elements to the stage. Alle of them are elements of the same instance. They are in an array.

      When one element of that instance is added to the stage, also MouseEvent.CLICK is added to that element.

      Now I want the element to disappear when it is clicked.

      But at the moment all the elements are disappearing when one is clicked.

      What should be the logic behind it?

      Should I but the event listeners to an array as well?

       

      Many thanks in advance!