Hi, I was hoping someone might be able to help me with this.
I have a group of display objects stored in an table called grid[x][y]
when a player clicks on a move option, depending on certain factors, I assign 1 of 3 different touch listeners to the surrounding display objects, but not all the display objects.
What is happening is that if the player does not complete the action by touching on one of these surrounding display objects, but instead, selects a totally unrelated display object, I want to cancel the previously assigned touch listeners.
I know that I can use removeEventListener(“touch”, myfunctionNames) for each specifically assigned listener, but what I want is to be able to remove all touch events of a particular flavor instead of rerunning the process I used to assign the specific listeners in the first place.
So is there a way to say removeEventListener(“touch”, onMoveTouch) that will then remove any and all touch listeners tied to the onMoveTouch function?
The reason I want to do this is because the first time, and many times actually that my function onTileTouch gets called, and where I need to cancel these listeners, these specific 3 flavors of additional touch listeners may not even exist, and often, only 1 of these touch listeners will exist.
So I just want to check if they exist, if they do, remove them and then check for the next type to be removed, etc.
If that is confusing, I can post specific code.
thanks [import]uid: 170004 topic_id: 35982 reply_id: 335982[/import]