I create Container, attach onPress function to it, then add it as Child to the stage.
Then clear the stage ( so there is no such child there anymore ), update it.
but onPress is still working.
I create Container, attach onPress function to it, then add it as Child to the stage.
Then clear the stage ( so there is no such child there anymore ), update it.
but onPress is still working.
what did you do the clear the stage?
stage.removeAllChildren()
Make sure your stage has no children by checking:
console.log(stage.getNumChildren());
if you want to remove the onPress listener, I simply do to:
container.onPress=null;
It may not be the best way to disable it, but it works for me.