I tried to trim it down a bit. I think this is the offending code.
[lua]
local composer = require( “composer” )
local scene = composer.newScene()
– include Corona’s “physics” library
local physics = require “physics”
local surrey=nil
local leftWall
local rightWall
local function applyMovementLoop ()
surrey:applyLinearImpulse(.005,0)
end
function movement (event)
if event.phase == “began” then
moveLoopTimer = timer.performWithDelay( 10, applyMovementLoop, 0 )
elseif event.phase == “ended” or event.phase == “cancelled” then
timer.cancel( moveLoopTimer )
end
return true
end
function scene:create( event )
local sceneGroup = self.view
physics.start()
physics.setGravity( -9.8, 0 )
physics.pause()
surrey= display.newImageRect(sceneGroup, “surrey.png”, 60,75)
surrey.x= halfW
surrey.y=screenH-100
physics.addBody( surrey,“dynamic”, {radius=22, bounce=0, } )
surrey.myName=“surrey”
surrey.isFixedRotation=true
surrey:setLinearVelocity(0,0)
leftWall = display.newLine(sceneGroup,10,0,10, display.contentHeight )
rightWall = display.newLine (sceneGroup,display.contentWidth-10, 0, display.contentWidth-10, display.contentHeight)
–leftWall.alpha=0
–rightWall.alpha=0
physics.addBody (leftWall, “static”, { bounce = 0} )
physics.addBody (rightWall, “static”, { bounce = 0} )
end
function scene:show( event )
local sceneGroup = self.view
local phase = event.phase
if phase == “will” then
elseif phase == “did” then
physics.start()
physics.setGravity(-9.8,0)
surrey:setLinearVelocity(0,0)
surrey.y=screenH-100
Runtime:addEventListener(“touch”, movement)
end
end
[/lua]