There might be additional properties on the event that can help you decide
which state you are exiting and whether to do anything.
They all work. Are you trying to remove the canvas from the display list? what are you trying to do here? if you are just hiding it by making visible = false, then try lookin for 'hide' event.
Thanks for your reply and help.
I have a menu with many options, each option will open a canvas component thru a viewStack.
When I call the component I item with viewStack.selectedItem = mycomponenIDNumber and fire the init() funciton, now when I click something else in the menu if I'm in a component I want to check something before I leave the component and fire a condition like:
Alert.show("Do you want to Save the updates?","ALERT", Alert.YES|Alert.NO, this, alertClickHandler);
Remove, removed and removeFromState doesn't fire.
Hide is working.