Scaleform Studio Lua API Reference: scaleform.EventDispatcher object reference

scaleform.EventDispatcher object reference

Description

The base object for managing event listeners and dispatching events to the listeners.

Functions

Parameters

self :

scaleform.EventDispatcher

The dispatcher whose event is considered.

eventType :

scaleform.EventTypes

The Id of the event.

listener :

scaleform.EventListener

The event listener added for the event.

Returns

boolean

Returns true if the event listener is added and false otherwise.

Parameters

self :

scaleform.EventDispatcher

The dispatcher whose event is dispatched for.

event :

scaleform.Event

The event to dispatch.

Returns

boolean

Returns true if the event was handled and false otherwise.

Parameters

self :

scaleform.EventDispatcher

The dispatcher to disconnect all event listeners connected to.

Returns
This function does not return any values.
Parameters

self :

scaleform.EventDispatcher

The dispatcher the listener is connected to.

eventType :

scaleform.EventTypes

The Id of the event.

listener :

scaleform.EventListener

The listener that is to be removed.

Returns

boolean

Returns true if the event listener is removed and false otherwise.

Parameters

self :

scaleform.EventDispatcher

The dispatcher the listener is connected to.

listener :

scaleform.EventListener

The listener that is to be removed.

Returns

boolean

Returns true if the event listener is removed and false otherwise.

 scaleform.Accelerometer
Dispatches events based on activity detected by the device's motion sensor.
 scaleform.Actor
Generic objects located in a scene.
 scaleform.FMODSound
A Sound object for audio.
 scaleform.Geolocation
Dispatches events in response to the device's location sensor.
 scaleform.physics.World
Manages all physics entities, dynamic simulation, and asynchronous queries.
 scaleform.Sound
A Sound object for playing audio through Wwise Wwise is only available if Scaleform Studio is compiled with it enabled (by default it is enabled).
 scaleform.TimerBase
An interface to timer objects.
 scaleform.Timer
Represents a timer.
 scaleform.Tweener
A Lua interface to Tweener.
 scaleform.EventListener.connect (listener, dispatcher, event) : boolean
Connects the event listener to stage events of the input type.
 scaleform.EventListener.disconnect (listener, dispatcher) : boolean
Disconnects all connections from the dispatcher type that listener has.
 scaleform.EventListener.disconnect (listener, dispatcher, event) : boolean
Disconnects a single connection of a given event type to a dispatcher the listener has.
 scaleform.EventDispatcher.add_event_listener (self, eventType, listener) : boolean
Add event listener for the dispatcher.
 self : scaleform.EventDispatcher
The dispatcher whose event is considered.
 eventType : scaleform.EventTypes
The Id of the event.
 listener : scaleform.EventListener
The event listener added for the event.
 boolean  scaleform.EventDispatcher
The base object for managing event listeners and dispatching events to the listeners.
 scaleform.EventTypes
The list of events.
 scaleform.EventListener
The EventListener type.
true or false.  scaleform.EventDispatcher.dispatch_event (self, event) : boolean
Dispatches an event to registered listeners.
 self : scaleform.EventDispatcher
The dispatcher whose event is dispatched for.
 event : scaleform.Event
The event to dispatch.
 boolean  scaleform.Event

{ currentTarget : scaleform.Actor?, eventId : scaleform.EventTypes, phase : string, target : scaleform.Actor?, }
 scaleform.EventDispatcher.remove_all_event_listeners (self)
Removes the event listener of the dispatcher.
 self : scaleform.EventDispatcher
The dispatcher to disconnect all event listeners connected to.
 scaleform.EventDispatcher.remove_event_listener (self, eventType, listener) : boolean
Removes the event listener of the dispatcher.
 self : scaleform.EventDispatcher
The dispatcher the listener is connected to.
 eventType : scaleform.EventTypes
The Id of the event.
 listener : scaleform.EventListener
The listener that is to be removed.
 boolean  scaleform.EventDispatcher.remove_event_listener_all_events (self, listener) : boolean
Removes the event listener of the dispatcher for all event types
 self : scaleform.EventDispatcher
The dispatcher the listener is connected to.
 listener : scaleform.EventListener
The listener that is to be removed.
 boolean  listener : scaleform.EventListener
The listener to connect
 dispatcher : scaleform.EventDispatcher
The dispatcher for the particular event, different objects dispatch different events.
 event : scaleform.EventTypes
The event type to receive.
 boolean  listener : scaleform.EventListener
The listener to disconnect.
 dispatcher : scaleform.EventDispatcher
The dispatcher the listener is connected to.
 boolean  listener : scaleform.EventListener
The listener to disconnect.
 dispatcher : scaleform.EventDispatcher
The dispatcher the listener is connected to.
 event : scaleform.EventTypes
The type of event to stop listening for.
 booleanA string of characters.Indicates a table.
This documentation uses the term table to mean an anonymous, temporary Lua table that contains named data values. You typically use these tables to pass data or settings to a function, or to hold data returned by a function.
Indicates an object.
This documentation uses the term object to mean a named Lua table or userdata value that maintains a state. Some object types may have multiple instances existing at the same time, each with its own state; these objects typically have creation functions or accessors that you must call in order to get an instance. Some object types have only one instance, which you always access through the object's name.
Indicates a named variable within a namespace, object or table; or an element within an enumeration.Indicates a code sample.Indicates an enumeration.
This documentation uses the term enumeration to mean a named Lua table that contains only a set of constant values. These values typically identify a predefined set of options for some setting or behavior. You might pass an enumeration value to a function, or test the value returned by a function against the items in the enumeration to see which option is currently set.
Indicates a named variable within a namespace or object that has a pre-set constant value.Indicates a category: a semantic grouping of related API elements.Indicates a namespace.
This documentation uses the term namespace to mean a named Lua table that exists in only one single instance, intended as a container for an interface of related objects, functions and data variables.
Indicates an output value returned by a function.Indicates a named function within a namespace or object.Indicates an input parameter for a function.