Difference between revisions of "Event"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === <br /> The objects of `Event` class contains information about an eve...")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
Line 10: Line 10:
 
when an `Event.MOUSE_DOWN` event occurs, `x` and `y` fields contain the coordinates.<br />
 
when an `Event.MOUSE_DOWN` event occurs, `x` and `y` fields contain the coordinates.<br />
 
Users can create their own events and dispatch through the event mechanism.<br />
 
Users can create their own events and dispatch through the event mechanism.<br />
 +
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 
{|-
 
{|-
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Methods ===
 
=== Methods ===
 +
[[Event.new]] - creates a new Event object<br/>
 +
[[Event:getTarget]] - returns the element on which the event listener was registered<br/>
 +
[[Event:getType]] - returns the type of Event<br/>
 +
[[Event:stopPropagation]] - stops the propagation of the current event in the scene tree hierarchy<br/>
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
 
|}
 
|}

Revision as of 08:57, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


The objects of `Event` class contains information about an event that has occurred. `Event` objects
are passed to event listeners when an event occurs.

Usually event objects contains 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 through the event mechanism.






Methods

Event.new - creates a new Event object
Event:getTarget - returns the element on which the event listener was registered
Event:getType - returns the type of Event
Event:stopPropagation - stops the propagation of the current event in the scene tree hierarchy

Events

Constants