title: Corona SDK composer and overlays
body: <p>I'm simply trying to use the <code>composer.showOverlay()</code> to display game-over, pause menu's etc.</p>
  
  <p>I'm using the <code>composer.showOverlay("gameoverlay",options)</code> to call the overlay when a scene ends(Timer goes to zero etc), but I'm getting an error telling me I'm trying to call a wrong module, like my pause.lua isn't properbly formatted 
  It looks like this</p>
  
  <pre><code>local composer = require( "composer" )
  local scene = composer.newScene()
  local myData = require( "myData" )
  
  -- -----------------------------------------------------------------------------------------------------------------
  -- All code outside of the listener functions will only be executed ONCE unless "composer.removeScene()" is called.
  -- -----------------------------------------------------------------------------------------------------------------
  
  -- local forward references should go here
  
  -- -------------------------------------------------------------------------------
  
  
  -- "scene:create()"unction scene:hide( event )
  function scene:hide( event )
     local sceneGroup = self.view
     local phase = event.phase
     local parent = event.parent  --reference to the parent scene object
  
     if ( phase == "will" ) then
        -- Call the "resumeGame()" function in the parent scene
  
     end
  end
  
  -- By some method (a "resume" button, for example), hide the overlay
  -- composer.hideOverlay( "fade", 400 )
  
  scene:addEventListener( "hide", scene )
  return scene
  
      local sceneGroup = self.view
  
      -- Initialize the scene here.
      -- Example: add display objects to "sceneGroup", add touch listeners, etc
  
      local background = display.newRect( 0, 0, display.actualContentHeigh, display.actualContentWidth
      bacground:setFillColor( black ) )
  
  
  
  
  
  
  
  -- -------------------------------------------------------------------------------
  
  -- Listener set)
  
  -- -------------------------------------------------------------------------------
  
  return scene
  </code></pre>
  
  <p>This is far from the only version of the gameoverlay.lua I have used. I also tried using the normal setup for composer scenes. 
  scene:create
  scene:show
  scene:hide
  scene:destroy. </p>
  
  <p>Still got the same error which looks like</p>
  
  <pre><code>Attempting to load scene from invalid scene module (gameoverlay.lua). Did you forget to return the scene object at the end of the scene module? (e.g. 'return scene')
  Attempting to load scene from invalid scene module (gameoverlay.lua). Did you forget to return the scene object at the end of the scene module? (e.g. 'return scene')
  </code></pre>