This code allows the user to shake the device to move a cube downward, but I would like to not need to shake the phone to get that functionality. The cube can be found in the site’s sample code folders and can be tested in the simulator by changing the orientation of the displayed phone and hitting “command” and “up”.
------ The Code
Holder = display.newImage( “cube01.png”, 240, 240 )
local function shakeme(event)
Holder.y = Holder.y - event.yGravity
end
Runtime:addEventListener(“accelerometer”,shakeme)
[import]uid: 4871 topic_id: 539 reply_id: 300539[/import]