title: Lua/Corona Attempt to Index a Boolean Value
body: <p>It looks like I am having problems with transitioning from my level select page to my first level. I think it might be that I am missing something in my level 1, but I don't know exactly.</p>
  
  <h2>levelSelect.lua</h2>
  
  <pre><code>module(..., package.seeall)
  
  local director = require ("director")
  
  local physics = require("physics")
  physics.start()
  
  local widget = require( "widget" )
  
  -- Function to handle button events
  local function handleButtonEventLevel1( event )
  local phase = event.phase
  if "ended" == phase then
      director:changeScene("lvl1")
      end
  end
  
  --local function goLevel1()
      --director:changeScene("lvl1")
      --return true
  --end
  --widget.newButton:addEventListener("tap", goLevel1)
  
  local function handleButtonEventToPage( event )
      local phase = event.phase
      if "ended" == phase then
          director:changeScene("page")
      end
  end
  
  -- Main function - MUST return a display.newGroup()
  function new()
      local localGroup = display.newGroup()
  
      local background = display.newImage("bigtestsky.png")
      background.x=150
      background.y=250
  
      local myButton = widget.newButton
      {
          left = 25,
          top = 25,
          width = 100,
          height = 50,
          defaultFile = "default.png",
          overFile = "over.png",
          label = "1",
          font = "LS",
          fontSize = 20,
          labelColor = { default = {0,0,50}, over = {0,0,255} },
          onEvent = handleButtonEventLevel1,
      }
  
      local myButton = widget.newButton
      {
          left = 25,
          top = 415,
          width = 100,
          height = 50,
          defaultFile = "default.png",
          overFile = "over.png",
          label = "BACK",
          font = "LS",
          fontSize = 20,
          labelColor = { default = {0,0,50}, over = {0,0,255} },
          onEvent = handleButtonEventToPage,
      }
  
      return localGroup
  end
  </code></pre>
  
  <h2>lvl1.lua</h2>
  
  <pre><code>local physics = require("physics")
  physics.start()
  local widget = require( "widget" )
  </code></pre>
  
  <p>(This is what I mean about missing something in the first level. Could someone please help?)</p>
  
  <hr>
  
  <pre><code>stack traceback:
          [C]: ?
          .../myName/Desktop/Bubbles! App/director.lua:116: in function 'loadScene'
          .../myName/Desktop/Bubbles! App/director.lua:394: in function 'changeScene'
          ...myName/Desktop/Bubbles! App/levelSelect.lua:14: in function '_onEvent'
          ?: in function '?'
          ?: in function &lt;?:405&gt;
          ?: in function &lt;?:218&gt;
  </code></pre>