jim716 Posted June 25, 2015 Share Posted June 25, 2015 Hi, Are there any functions or callbacks that are invoked when a Sprite is added or removed from the stage/world? I would like certain sprites to be able to initialize or shutdown input, etc. based on being on stage. Thanks! Link to comment Share on other sites More sharing options...
rich Posted June 26, 2015 Share Posted June 26, 2015 sprite.events.onAddedToGroupsprite.events.onRemovedFromGroupDon't forget that the World is a Group. So adding and removing from the World will fire the above events. They will NOT be fired if the sprite is added as a child of another sprite. Link to comment Share on other sites More sharing options...
Recommended Posts