Reputation: 2522
I am having a lot of trouble adding and removing items to the sceneGroup from listener functions and other functions which are outside of the standard scene:createScene
and scene:enterScene
.
Every so often I need to completely reset a lot of the objects on the screen and I have a function contentReset()
at the top of the scene, after the first two typical lines of
local storyboard = require( "storyboard" )
local scene = storyboard.newScene()
In contentReset()
I delete some objects created in scene:createScene and add new ones. But they refuse to work with sceneGroup:Insert()
, even if I declare the object names at the top of the scene file, as Corona has done in the Storyboard samples...
In conclusion/summary: I would like to see how to manage the creation and deletion of sceneGroup members outside of the initial create/enter scene functions.
Upvotes: 0
Views: 817
Reputation: 113
I am using the same API,when I want to exit the scene I use a exit scene function and in that scene I use:
storyboard.purgeScene("scene");
storyboard.removeAll()
It removes the display objects,I am not sure if that is what you are looking for.
Upvotes: -1