I need a simple storyboard example for corona for my game that is complete

I desperately need storyboard help. Just finished my wicked game. It has a menu and 10 levels represented my ten lua files. The main menu looks like this ?

[code]


– main.lua


– hide the status bar
–display.setStatusBar( display.HiddenStatusBar )

– include the Corona “storyboard” module
local storyboard = require “storyboard”

– load menu screen
storyboard.gotoScene( “menu” )

[code]

The storyboard example that comes with Corona under sample code - interface - storyboard does not fit my needs. I need an example that show how to simple add buttons that users can click on to go to each level.
[import]uid: 6134 topic_id: 36957 reply_id: 336957[/import]

in the function you call use this with the correct scene name.
storyboard.gotoScene( “yourLuaFileWithoutDotLua” )
Just make sure all your 10 scenes are storyboard scenes too. [import]uid: 100901 topic_id: 36957 reply_id: 145192[/import]

In the Corona Simulator, go to File->New Project…, and select Physics Based Game. It will create a new project that uses storyboards, and you can click a button to go to a level. [import]uid: 145848 topic_id: 36957 reply_id: 145196[/import]

scene template:

local storyboard = require( "storyboard" )  
local scene = storyboard.newScene()  
  
function scene:createScene( event )  
 local group = self.view  
  
 -- you probably want an image here, but a white rectangle will do for the template.  
 local background = display.newRect(0,0,display.contentWidth,display.contentHeight)  
 background:setFillColor(255,255,255)  
 group:insert(background)  
 background.x = display.contentCenterX  
 background.y = display.contentCenterY  
  
end  
  
function scene:enterScene( event )  
 local group = self.view  
  
end  
  
function scene:exitScene( event )  
 local group = self.view  
  
end  
  
function scene:destroyScene( event )  
 local group = self.view  
end  
  
function scene:overlayEnded( event )  
 local group = self.view  
end  
  
scene:addEventListener( "createScene", scene )  
scene:addEventListener( "enterScene", scene )  
scene:addEventListener( "exitScene", scene )  
scene:addEventListener( "destroyScene", scene )  
scene:addEventListener( "overlayEnded", scene )  
  
return scene  

That is the starting code for pretty much every storyboard scene you will create. Follow the example where the background is being created as to how to create your other scene objects while making sure to do a :

  
 group:insert(yourcreatedobject)  
  

for everything you create, if not Storyboard won’t manage that object. [import]uid: 199310 topic_id: 36957 reply_id: 145235[/import]

in the function you call use this with the correct scene name.
storyboard.gotoScene( “yourLuaFileWithoutDotLua” )
Just make sure all your 10 scenes are storyboard scenes too. [import]uid: 100901 topic_id: 36957 reply_id: 145192[/import]

In the Corona Simulator, go to File->New Project…, and select Physics Based Game. It will create a new project that uses storyboards, and you can click a button to go to a level. [import]uid: 145848 topic_id: 36957 reply_id: 145196[/import]

scene template:

local storyboard = require( "storyboard" )  
local scene = storyboard.newScene()  
  
function scene:createScene( event )  
 local group = self.view  
  
 -- you probably want an image here, but a white rectangle will do for the template.  
 local background = display.newRect(0,0,display.contentWidth,display.contentHeight)  
 background:setFillColor(255,255,255)  
 group:insert(background)  
 background.x = display.contentCenterX  
 background.y = display.contentCenterY  
  
end  
  
function scene:enterScene( event )  
 local group = self.view  
  
end  
  
function scene:exitScene( event )  
 local group = self.view  
  
end  
  
function scene:destroyScene( event )  
 local group = self.view  
end  
  
function scene:overlayEnded( event )  
 local group = self.view  
end  
  
scene:addEventListener( "createScene", scene )  
scene:addEventListener( "enterScene", scene )  
scene:addEventListener( "exitScene", scene )  
scene:addEventListener( "destroyScene", scene )  
scene:addEventListener( "overlayEnded", scene )  
  
return scene  

That is the starting code for pretty much every storyboard scene you will create. Follow the example where the background is being created as to how to create your other scene objects while making sure to do a :

  
 group:insert(yourcreatedobject)  
  

for everything you create, if not Storyboard won’t manage that object. [import]uid: 199310 topic_id: 36957 reply_id: 145235[/import]

in the function you call use this with the correct scene name.
storyboard.gotoScene( “yourLuaFileWithoutDotLua” )
Just make sure all your 10 scenes are storyboard scenes too. [import]uid: 100901 topic_id: 36957 reply_id: 145192[/import]

In the Corona Simulator, go to File->New Project…, and select Physics Based Game. It will create a new project that uses storyboards, and you can click a button to go to a level. [import]uid: 145848 topic_id: 36957 reply_id: 145196[/import]

scene template:

local storyboard = require( "storyboard" )  
local scene = storyboard.newScene()  
  
function scene:createScene( event )  
 local group = self.view  
  
 -- you probably want an image here, but a white rectangle will do for the template.  
 local background = display.newRect(0,0,display.contentWidth,display.contentHeight)  
 background:setFillColor(255,255,255)  
 group:insert(background)  
 background.x = display.contentCenterX  
 background.y = display.contentCenterY  
  
end  
  
function scene:enterScene( event )  
 local group = self.view  
  
end  
  
function scene:exitScene( event )  
 local group = self.view  
  
end  
  
function scene:destroyScene( event )  
 local group = self.view  
end  
  
function scene:overlayEnded( event )  
 local group = self.view  
end  
  
scene:addEventListener( "createScene", scene )  
scene:addEventListener( "enterScene", scene )  
scene:addEventListener( "exitScene", scene )  
scene:addEventListener( "destroyScene", scene )  
scene:addEventListener( "overlayEnded", scene )  
  
return scene  

That is the starting code for pretty much every storyboard scene you will create. Follow the example where the background is being created as to how to create your other scene objects while making sure to do a :

  
 group:insert(yourcreatedobject)  
  

for everything you create, if not Storyboard won’t manage that object. [import]uid: 199310 topic_id: 36957 reply_id: 145235[/import]

in the function you call use this with the correct scene name.
storyboard.gotoScene( “yourLuaFileWithoutDotLua” )
Just make sure all your 10 scenes are storyboard scenes too. [import]uid: 100901 topic_id: 36957 reply_id: 145192[/import]

In the Corona Simulator, go to File->New Project…, and select Physics Based Game. It will create a new project that uses storyboards, and you can click a button to go to a level. [import]uid: 145848 topic_id: 36957 reply_id: 145196[/import]

scene template:

local storyboard = require( "storyboard" )  
local scene = storyboard.newScene()  
  
function scene:createScene( event )  
 local group = self.view  
  
 -- you probably want an image here, but a white rectangle will do for the template.  
 local background = display.newRect(0,0,display.contentWidth,display.contentHeight)  
 background:setFillColor(255,255,255)  
 group:insert(background)  
 background.x = display.contentCenterX  
 background.y = display.contentCenterY  
  
end  
  
function scene:enterScene( event )  
 local group = self.view  
  
end  
  
function scene:exitScene( event )  
 local group = self.view  
  
end  
  
function scene:destroyScene( event )  
 local group = self.view  
end  
  
function scene:overlayEnded( event )  
 local group = self.view  
end  
  
scene:addEventListener( "createScene", scene )  
scene:addEventListener( "enterScene", scene )  
scene:addEventListener( "exitScene", scene )  
scene:addEventListener( "destroyScene", scene )  
scene:addEventListener( "overlayEnded", scene )  
  
return scene  

That is the starting code for pretty much every storyboard scene you will create. Follow the example where the background is being created as to how to create your other scene objects while making sure to do a :

  
 group:insert(yourcreatedobject)  
  

for everything you create, if not Storyboard won’t manage that object. [import]uid: 199310 topic_id: 36957 reply_id: 145235[/import]