Professional Documents
Culture Documents
www.anscamobile.com
Whats Corona A simple, yet powerful framework allowing rapid mobile cross platform application development.
www.anscamobile.com
TM
www.anscamobile.com
TM
www.anscamobile.com
TM
Disadvantages: When program begins to get too big, difficult to manage code reusing code becomes hard to break apart debugging becomes a nightmare no sense of where program starts
www.anscamobile.com
TM
Corona Functions:
First-class values. Passed by value. Stored in tables. Returned from functions. Global and local. called from other packages
www.anscamobile.com
TM
www.anscamobile.com
TM
www.anscamobile.com
TM
www.anscamobile.com
TM
Corona EventListeners:
Coronas event listeners are part of the Corona framework and not part of the Lua programming language.
http://developer.anscamobile.com/content/events-and-listeners
www.anscamobile.com
TM
Corona EventListeners:
Event listeners allow Coronas display objects and program scope to register for specific events to respond to.
http://developer.anscamobile.com/content/events-and-listeners
www.anscamobile.com
TM
Corona EventListeners:
To setup an event listener you must attach an addEventListener. register a function to listen to the event. Optional, remove the event listener after use.
http://developer.anscamobile.com/content/events-and-listeners
www.anscamobile.com
TM
Corona EventListeners:
There are two types of event listeners Runtime dispatched by the system Display-object self-explanatory.
http://developer.anscamobile.com/content/events-and-listeners
www.anscamobile.com
TM
www.anscamobile.com
TM
www.anscamobile.com
TM
Listeners
local listener = function(event) print( event.name, event.time ) end Runtime:addEventListener("enterFrame", listener)
www.anscamobile.com
TM
Event Types
enterFrame system orientation accelerometer GPS heading touch timer ...
www.anscamobile.com
TM
Touch + Multitouch
x y xStart yStart phase id time
www.anscamobile.com
TM
Corona SDK
Code Less. Play More.