Regarding the swipe question, looks like someone beat me to it! That’s exactly how I’d recommend doing it, so thanks @risingfrom.
To answer your question about modules.
When you call storyboard.removeScene( “myScene” ), that module IS completely removed from memory. When you call storyboard.gotoScene( “myScene” ), the module is then reloaded (as if it was the first time you loaded it). It is only when you call storyboard.purgeScene( “myScene” ) that the module is not unloaded (only the scene.view display group).
@scott0: That’s actually a bug that I’ve already fixed over here (along with a bunch of other good stuff, which I’ll get into in a moment), so stay tuned for an update that will fix the ‘objects on top’ issue. When the daily build with the update is available, you’ll simply create the background object before the ‘require “storyboard”’ line in main.lua.
If you can’t wait for the update (should be out within the next couple daily builds), then currently, in the version that’s out now, the scenes sit just below everything you might’ve created in main.lua, so if you want something to go behind your scenes when using storyboard, you can do something like this:
local storyboard = require "storyboard"storyboard.gotoScene( "scene1" )-- create imagelocal background = display.newImage( "bg.png" )-- do a timer delay or it won't worktimer.performWithDelay(1, function() display.getCurrentStage():insert( 1, background )end, 1 )[/code]Before the update gets checked-in (should be very soon), you'll have to do that whenever you do a scene change, so you may want to store a reference to your background object in the storyboard table. I recommend waiting until the daily build with the fix comes out before setting a background image though, so you don't have to go back and modify your code.Quick Update on What's Coming The following new things should be available soon, within the next few Daily Builds.New Effects Currently, all of the available effects will leave the current scene in place. However, due to popular demand, I've added some 'sliding' effects that will push the original scene over:slideLeftslideRightslideDownslideUpNew Functions storyboard.purgeAll() - purges all loaded scenes (except for the current scene).storyboard.removeAll() - removes all loaded scenes (except for the current scene).storyboard.getPrevious() - returns the previous scene name (as a string).storyboard.getScene( sceneName ) - returns the specified sceneName's scene object.New Feature In the upcoming update, you will be able to optionally specify a 'sceneName' when calling storyboard.newScene(), so scenes do not actually HAVE to be attached to external modules. For examples, you can create three (or more) different scene objects in one module, and just assign the appropriate listeners to them as you would other objects! (for scene events, of course).This is a special-use feature, as most will probably be sticking to the scene-per-module method, where no sceneName is specified in your call to storyboard.newScene() — as you are doing now.-----I'll update this thread (and the documentation pages) once a Daily Build with these changes is available for download.Thanks for the feedback/questions everyone! [import]uid: 52430 topic_id: 17828 reply_id: 68244[/import]