I have an app which is using a vector object to create and display multiple dynamic items on the stage.
When I quit the game and then return to the inGame screen the objects are still visible. I have tried a number of ways to remove but nothing has worked.
I have null’ed the vectors but the objects still remain on the stage.
Basically I just need to clear the stage when the game is quit.
I am using:
var item = new Vector.<Item>();
to create.
The user quits the game by hitting the pause button and then a ‘back to menu’ button.
Any guidance is appreciated.
Once you perform an
addChild()on something, that something receives another link to it, namely from display list. So you have to manually callremoveChild()on each of your dynamic objects you store in your Vector, before actually dropping the vector.