Corona – Cheat Sheet


local function on_accelerometer( event )
	local xGravity = event.xGravity
	local yGravity = event.yGravity

Runtime:addEventListener( "accelerometer", on_accelerometer )

Get Corona Remote or rCorona to test accelerometer with the simulator.

New text

display.newText( [parentGroup,] string, left, top, [width, height,] font, size )
local myText = display.newText("Hello World!", 0, 0, native.systemFont, 16)

Status Bar


Text Object :

display.NewText( "default", left, top, font, fontSize)
display.NewText( "default", 0, 0, native.systemFont, 24 )

Leave a Reply

Your email address will not be published. Required fields are marked *