title: Touch Event Executes Five (5) Times Instead of Once
body: <p>I'm writing a game using LUA Glider and Level Director X for making the levels along with TexturePacker to create spritesheets. I'm encountering a very unusual thing with a touch event handler.</p>
  
  <p>As you can see in the code I have an object called "sign". I've assigned a touch event handler to it that calls the function "flipSign". The function flip sign checks if the touch event has ended and if so it increases a variable called "signDirection" by 1 and prints the value.</p>
  
  <p>Every time I run the app and click the sign in Corona Simulator the output prints:</p>
  
  <p>1
  2
  3
  4
  5</p>
  
  <p>Clicking the sign again increases the variable another 5 times to 10. My understanding is the code should only increase the variable by 1 each time the sign is clicked.</p>
  
  <p>Any help understanding why this is happening would be greatly appreciated.</p>
  
  <p>Thanks!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>local composer = require( "composer" )
  local scene = composer.newScene()
  
  require("lib.LD_LoaderX")
  physics = require ("physics")
  physics.start()
  
  
  
  local render = require ("render")
  
  -- -----------------------------------------------------------------------------------
  -- Code outside of the scene event functions below will only be executed ONCE unless
  -- the scene is removed entirely (not recycled) via "composer.removeScene()"
  -- -----------------------------------------------------------------------------------
  
  local myLevel = {}
  
  local signDirection = 0
  
  
  local function flipSign( event )
      
      
      if (event.phase == "ended") then
          signDirection = signDirection + 1
          print(event.phase)
          
          
      end
      return true
  end
  
  -- -----------------------------------------------------------------------------------
  -- Scene event functions
  -- -----------------------------------------------------------------------------------
   
  -- create()
  function scene:create( event )
      -- Code here runs when the scene is first created but has not yet appeared on screen
      
      local sceneGroup = self.view
      myLevel= LD_Loader:new(self.view)
      myLevel:loadLevel("level_1")
      
  end
   
   
  -- show()
  function scene:show( event )
   
      local sceneGroup = self.view
      local phase = event.phase
   
      if ( phase == "will" ) then
          -- Code here runs when the scene is still off screen (but is about to come on screen)
      
          local sign = myLevel:getLayerObject("island_4", "Sign_2_4").view
          sign:addEventListener ( "touch", flipSign )
   
      elseif ( phase == "did" ) then
          -- Code here runs when the scene is entirely on screen
        
          
          
   
      end
  end
   
   
  -- hide()
  function scene:hide( event )
   
      local sceneGroup = self.view
      local phase = event.phase
   
      if ( phase == "will" ) then
          -- Code here runs when the scene is on screen (but is about to go off screen)
   
      elseif ( phase == "did" ) then
          -- Code here runs immediately after the scene goes entirely off screen
         
      end
  end
   
   
  -- destroy()
  function scene:destroy( event )
   
      local sceneGroup = self.view
      -- Code here runs prior to the removal of scene's view
      myLevel:removeLevel()
      myLevel = nil
  
   
  end
   
   
  -- -----------------------------------------------------------------------------------
  -- Scene event function listeners
  -- -----------------------------------------------------------------------------------
  scene:addEventListener( "create", scene )
  scene:addEventListener( "show", scene )
  scene:addEventListener( "hide", scene )
  scene:addEventListener( "destroy", scene )
  -- -----------------------------------------------------------------------------------
   
  return scene</code></pre>
  </div>
  </div>
  </p>