RegisterEventHandler

From VisionaireWiki
Revision as of 22:54, 2 August 2011 by Alex (talk | contribs) (Created page with "==registerEventHandler== Registers an event handler function for a specific event. Lua Syntax: <pre>registerEventHandler(event, eventHandler)</pre> ===Arguments=== ====event==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

registerEventHandler

Registers an event handler function for a specific event.

Lua Syntax:

registerEventHandler(event, eventHandler)

Arguments

event

"string" - The event which triggers the event handler to be called. Currently supported events: "mainLoop", "animationStarted", "animationStopped", "textStarted", "textStopped".

eventHandler

"string" - The name of the lua function which is called when the event occurs. The function (except for "mainLoop" event handler) should take exactly one argument which is the affected visionaire object. There are no arguments for the "mainLoop" event handler.

Flags

Return Values

None.