So wrote this code with the help of a video
local physics = require(“physics”)
physics.start()
system.actvate( “multitouch” )
physics.setDrawMode(“debug”)
display.setStatusBar( display.HiddenStatusBar )
physics.setGravity(0, 4.9)
local background = display.newImage(“nuclear_iphone_wallpapers.jpg”)
local can = display.newImage(“can.png”)
can.x = display.contentWidth/2
physics.addBody(can {bounce = 0.5, friction = 1.0})
local can2 = display.newImage(“can.png”)
can2.x = can.x - 105
physics.addBody(can2 {bounce = 0.5, friction = 1.0})
local can3 = display.newImage(“can.png”)
can3.x = can.x +105
physics.addBody(can3 {bounce = 0.6, friction = 1.0})
local leftWall = display.newRect(0, 0, 1, display.contentHeight )
local rightWall = display.newRect(display.contentWidth, 0, 1, display.contentHeight )
local ceiling = display.newrect(0, 0, display.contentWidth, 1 )
physics.addbody(leftWall, “static”, { bounce = 0.1} )
physics.addbody(rightWall, “static”, { bounce = 0.1} )
physics.addbody(ceiling, “static”, { bounce = 0.1} )
local floor = display.newImage(“floor.png”)
floor.y = display.contentHeight - floor.stageHeight/2
physics.addBody(floor, “static”, { bounce = 0.2, friction = 1.0})
function moveCan(event)
local can = event.target
can:applyLinearImpulse( 0, -0.2, event.x, event.y )
end
can:addEventListener(“touch”, moveCan)
can2:addEventListener(“touch”, moveCan)
can3:addEventListener(“touch”, moveCan)
After this it wouldnt run and i got these errors in the corona terminal
2011-01-18 18:31:03.185 Corona Simulator[646:903] Got error in FileWatch lastTimeModification
this keeps happening repeatedly then it stops
Can anyone please help?? [import]uid: 17040 topic_id: 5177 reply_id: 305177[/import]