Event
Supported platforms:
Available since: Gideros 2011.6
Inherits from: Object
Description
The objects of Event class contain information about an event that has occurred. Event objects are passed to event listeners when an event occurs.
Usually, event objects contain specific additional information about the event that has occured. For example, when an Event.MOUSE_DOWN event occurs, x and y fields contain the coordinates.
Users can create their own events and dispatch them through the event mechanism.
Examples
Mouse down event example
function onMouseDown(event)
print(event.x, event.y)
end
mysprite:addEventListener(Event.MOUSE_DOWN, onMouseDown)
User created event
local event = Event.new("myevent")
event.data1 = "12345"
event.data2 = "abcde"
mydispatcher:dispatchEvent(event)
MethodsEvent.new creates a new Event object |
EventsConstants |
- Event
- Event.ADDED TO STAGE
- Event.ADS READY
- Event.AD ACTION BEGIN
- Event.AD ACTION END
- Event.AD CONSENT
- Event.AD DISMISSED
- Event.AD ERROR
- Event.AD FAILED
- Event.AD RECEIVED
- Event.AD REWARDED
- Event.ANIMATION COMPLETE
- Event.ANIMATION END
- Event.ANIMATION START
- Event.APPLICATION BACKGROUND
- Event.APPLICATION EXIT
- Event.APPLICATION FOREGROUND
- Event.APPLICATION PERMISSION
- Event.APPLICATION RESIZE
- Event.APPLICATION RESUME
- Event.APPLICATION START
- Event.APPLICATION SUSPEND
- Event.BANNER ACTION BEGIN
- Event.BANNER ACTION FINISHED
- Event.BANNER AD FAILED
- Event.BANNER AD LOADED
- Event.BEGIN CONTACT
- Event.BEGIN CONTACT PARTICLE
- Event.CHECK BILLING SUPPORTED COMPLETE
- Event.COMPLETE
- Event.CONFIRM NOTIFICATION COMPLETE
- Event.CONNECTED
- Event.CONNECTED TO ROOM
- Event.DATA AVAILABLE
- Event.DATA RECEIVED
- Event.DIALOG CANCEL
- Event.DIALOG COMPLETE
- Event.DIALOG ERROR
- Event.DISCONNECTED
- Event.DISCONNECTED FROM ROOM
- Event.END CONTACT
- Event.ENTER FRAME
- Event.ERROR
- Event.GAME STARTED
- Event.HEADING UPDATE
- Event.INVITATION RECEIVED
- Event.JOINED ROOM
- Event.KEY CHAR
- Event.KEY DOWN
- Event.KEY UP
- Event.LAYOUT RESIZED
- Event.LEFT JOYSTICK
- Event.LEFT ROOM
- Event.LEFT TRIGGER
- Event.LOAD ACHIEVEMENTS COMPLETE
- Event.LOAD ACHIEVEMENTS ERROR
- Event.LOAD SCORES COMPLETE
- Event.LOAD SCORES ERROR
- Event.LOCAL NOTIFICATION
- Event.LOCATION UPDATE
- Event.LOGIN CANCEL
- Event.LOGIN COMPLETE
- Event.LOGIN ERROR
- Event.LOGOUT COMPLETE
- Event.MEDIA CANCEL
- Event.MEDIA RECEIVE
- Event.MEMORY WARNING
- Event.MOUSE DOWN
- Event.MOUSE ENTER
- Event.MOUSE HOVER
- Event.MOUSE LEAVE
- Event.MOUSE MOVE
- Event.MOUSE UP
- Event.MOUSE WHEEL
- Event.OPEN URL
- Event.PEER CONNECTED
- Event.PEER DECLINED
- Event.PEER DISCONNECTED
- Event.PEER INVITED
- Event.PEER JOINED
- Event.PEER LEFT
- Event.PLAYER INFORMATION COMPLETE
- Event.PLAYER INFORMATION ERROR
- Event.PLAYER SCORE COMPLETE
- Event.PLAYER SCORE ERROR
- Event.POST SOLVE
- Event.PRE SOLVE
- Event.PROGRESS
- Event.PURCHASE STATE CHANGE
- Event.PUSH NOTIFICATION
- Event.PUSH REGISTRATION
- Event.PUSH REGISTRATION ERROR
- Event.RECEIVED SHARE OPENED
- Event.REMOVED FROM STAGE
- Event.REPORT ACHIEVEMENT COMPLETE
- Event.REPORT ACHIEVEMENT ERROR
- Event.REPORT SCORE COMPLETE
- Event.REPORT SCORE ERROR
- Event.REQUEST COMPLETE
- Event.REQUEST ERROR
- Event.REQUEST PRODUCTS COMPLETE
- Event.REQUEST PURCHASE COMPLETE
- Event.RESTORE TRANSACTIONS COMPLETE
- Event.RIGHT JOYSTICK
- Event.RIGHT TRIGGER
- Event.ROOM AUTO MATCHING
- Event.ROOM CONNECTED
- Event.ROOM CONNECTING
- Event.ROOM CREATED
- Event.SENT SHARE OPENED
- Event.STATE CONFLICT
- Event.STATE DELETED
- Event.STATE ERROR
- Event.STATE LOADED
- Event.TIMER
- Event.TIMER COMPLETE
- Event.TOUCHES BEGIN
- Event.TOUCHES CANCEL
- Event.TOUCHES END
- Event.TOUCHES MOVE
- Event.TRANSACTION
- Event.VIDEO COMPLETE
- Event.new
- Event:getTarget
- Event:getType
- Event:stopPropagation
- EventDispatcher
- EventDispatcher.new
- EventDispatcher:addEventListener
- EventDispatcher:dispatchEvent
- EventDispatcher:hasEventListener
- EventDispatcher:removeAllListeners
- EventDispatcher:removeEventListener
- Event system