O'Reilly logo

Corona SDK Mobile Game Development by Michelle M. Fernandez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – adding the loading screen

We'll be placing loading screens when the application launches and before the game level starts. This tells the user that more content or information is on its way.

  1. Create a new file called loadmainmenu.lua in your project folder.
  2. Import Storyboard and add in the storyboard.newScene() function.
    local storyboard = require( "storyboard" )
    local scene = storyboard.newScene()
  3. Create two local variables called myTimer and loadingImage. Add in the createScene() event and a screenGroup display group.
    local myTimer
    local loadingImage
    
    -- Called when the scene's view does not exist:
    function scene:createScene( event )
      local screenGroup = self.view
      
      print( "\nloadmainmenu: createScene event" )
    end
  4. Create the enterScene() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required