remove object from already loaded scene

Hi,

so I have this main scene where my menu is, from it you can access an option screen which constists of another scene. In the option screen you can operate different choices, one these supposedly should affect the appearance of the previous menu (in this case I’m trying to remove an object from the main menu).

The thing is when i go back to the menu from the option screen the menu scene is already loaded (create phase has occured the first time the scene was loaded) so into which phase am I supposed to put a line such as display.remove (myobject) ?? I’ve tried to stuff it everywhere in ‘showscene’ but it doesn’t do anything? Why is this???

Thanks

I guess you are loading an overlay (screen). Try to destroy the older scene if there are any changes in your options. See “composer.removeScene( sceneName, shouldRecycle )”

thanks yosu.

It’s not an overlay scene, but it sorta behaves like it is… I’m very new to programming, but I assume once a scene gets loaded by composer there’s a little you can change of it…

Anyway the template posted here solved this problem:

http://forums.coronalabs.com/topic/46847-composer-bug-cannot-reload-scene-more-than-once-2259/#entry263131

I guess you are loading an overlay (screen). Try to destroy the older scene if there are any changes in your options. See “composer.removeScene( sceneName, shouldRecycle )”

thanks yosu.

It’s not an overlay scene, but it sorta behaves like it is… I’m very new to programming, but I assume once a scene gets loaded by composer there’s a little you can change of it…

Anyway the template posted here solved this problem:

http://forums.coronalabs.com/topic/46847-composer-bug-cannot-reload-scene-more-than-once-2259/#entry263131