Hi, I have a strange problem.
I have a button widget on screen, as well as a series of sprites (held in a mysprites table) which are controlled by the user’s touch. When each sprite is generated, I add an event listener to it as such:
mysprite[index]:addEventListener( “touch”, mysprite[index])
and when the user completes a level, I loop through the sprites and remove the listener with:
mysprite[index]:removeEventListener( “touch”, mysprite[index])
However, when I do this, the listener from my button also gets removed and nothing fires when I click it. If I remove the above line, it works fine, even though the widget button has nothing to do with the sprites I’m trying to change.
Am I missing something obvious about the way event listeners work, or could this be a bug in the event listener removal process?