ScriptBind_UIAction

ReloadElement

Reloads the UI flash asset.

UIAction.ReloadElement( elementName, instanceID )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.

UnloadElement

Unloads the UI flash asset.

UIAction.UnloadElement( elementName, instanceID )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.

ShowElement

Displays the UI flash asset.

UIAction.ShowElement( elementName, instanceID )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.

HideElement

Hide the UI flash asset.

UIAction.HideElement( elementName, instanceID )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.

RequestHide

Send the fade out signal to the UI flash asset.

UIAction.RequestHide( elementName, instanceID )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.

CallFunction

Calls a function of the UI flash asset or the UIEventSystem.

UIAction.CallFunction( elementName, instanceID, functionName, [arg1], [arg2], [...] )
ParameterDescription
elementNameUI Element name as defined in the xml or UIEventSystem name as defined via cpp.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances. If used on UIEventSystem no instance id is ignored.
functionNameFunction or event name.
argsList of arguments (optional).

SetVariable

Sets a variable of the UI flash asset.

UIAction.SetVariable( elementName, instanceID, varName, value )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
varNameVariable name as defined in the xml.
valueValue to set.

GetVariable

Gets a variable of the UI flash asset.

UIAction.GetVariable( elementName, instanceID, varName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
varNameVariable name as defined in the xml.

SetArray

Sets an array of the UI flash asset.

UIAction.SetArray( elementName, instanceID, arrayName, values )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
arrayNameArray name as defined in the xml.
valuesTable of values for the array.

GetArray

Returns a table with values of the array.

UIAction.GetArray( elementName, instanceID, arrayName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
arrayNameArray name as defined in the xml.

GotoAndPlay

Call GotoAndPlay on a MovieClip.

UIAction.GotoAndPlay( elementName, instanceID, mcName, frameNum )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
frameNumframe number.

GotoAndStop

Call GotoAndStop on a MovieClip.

UIAction.GotoAndStop( elementName, instanceID, mcName, frameNum )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
frameNumframe number.

GotoAndPlayFrameName

Call GotoAndPlay on a MovieClip by frame name.

UIAction.GotoAndPlayFrameName( elementName, instanceID, mcName, frameName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
frameNameframe name.

GotoAndStopFrameName

Call GotoAndStop on a MovieClip by frame name.

UIAction.GotoAndStopFrameName( elementName, instanceID, mcName, frameName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
frameNameframe name.

SetAlpha

Set MovieClip alpha value.

UIAction.SetAlpha( elementName, instanceID, mcName, fAlpha )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
fAlphaalpha value (0-1).

GetAlpha

Get MovieClip alpha value.

UIAction.GetAlpha( elementName, instanceID, mcName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.

SetVisible

Set MovieClip visible state.

UIAction.SetVisible( elementName, instanceID, mcName, bVisible )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
bVisiblevisible.

IsVisible

Get MovieClip visible state.

UIAction.IsVisible( elementName, instanceID, mcName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.

SetPos

Set MovieClip position.

UIAction.SetPos( elementName, instanceID, mcName, vPos )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
vPosposition.

GetPos

Get MovieClip position.

UIAction.GetPos( elementName, instanceID, mcName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.

SetRotation

Set MovieClip rotation.

UIAction.SetRotation( elementName, instanceID, mcName, vRotation )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
vRotationrotation.

GetRotation

Get MovieClip rotation.

UIAction.GetRotation( elementName, instanceID, mcName )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances
mcNameMovieClip name as defined in the xml.

SetScale

Set MovieClip scale.

UIAction.SetScale( elementName, instanceID, mcName, vScale )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.
vScalescale.

GetScale

Get MovieClip scale.

UIAction.GetScale( elementName, instanceID, mcName  )
ParameterDescription
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
mcNameMovieClip name as defined in the xml.

StartAction

Starts a UI Action.

UIAction.StartAction( actionName, arguments )
ParameterDescription
actionNameUI Action name.
argumentsarguments to pass to this action.

EndAction

Ends a UI Action. This can be only used withing a UIAction Lua script!

UIAction.EndAction( table, disable, arguments )
ParameterDescription
tablemust be "self".
disableif true this action gets disabled on end.
argumentsarguments to return from this action.

EnableAction

Enables the UI Action.

UIAction.EnableAction( actionName )
ParameterDescription
actionNameUI Action name.

DisableAction

Disables the UI Action.

UIAction.DisableAction( actionName )
ParameterDescription
actionNameUI Action name.

RegisterElementListener

Register a callback function for a UIElement event. Callback Function must have form: CallbackName(elementName, instanceId, eventName, argTable)

UIAction.RegisterElementListener( table, elementName, instanceID, eventName, callbackFunctionName )
ParameterDescription
tablethe script that receives the callback (can be "self" to refer the current script).
elementNameUI Element name as defined in the xml.
instanceIDID of the instance (if instance with id does not exist, it will be created). '-1' for all instances.
eventNameName of the event that is fired from the UI Element - if empty string it will receive all events!
callbackFunctionNamename of the script function that will receive the callback.

RegisterActionListener

Register a callback function for a UIAction event. Callback Function must have form: CallbackName(actionName, eventName, argTable)

UIAction.RegisterActionListener( table, actionName, eventName, callbackFunctionName )
ParameterDescription
tablethe script that receives the callback (can be "self" to refer the current script).
actionNameUI Action name.
eventNameName of the event that is fired from the UI Action (can be "OnStart" or "OnEnd") - if empty string it will receive all events!
callbackFunctionNamename of the script function that will receive the callback.

RegisterEventSystemListener

Register a callback function for a UIEventSystem event. Callback Function must have form: CallbackName(actionName, eventName, argTable)

UIAction.RegisterEventSystemListener( table, eventSystem, eventName, callbackFunctionName )
ParameterDescription
tablethe script that receives the callback (can be "self" to refer the current script).
eventSystemUI Event System name
eventNameName of the event that is fired from the UI EventSystem - if empty string it will receive all events!
callbackFunctionNamename of the script function that will receive the callback.

UnregisterElementListener

Unregister callback functions for a UIElement event.

UIAction.UnregisterElementListener( table, callbackFunctionName )
ParameterDescription
tablethe script that receives the callback (can be "self" to refer the current script).
callbackFunctionNamename of the script function that receives the callback. if "" all callbacks for this script will be removed.

UnregisterActionListener

Unregister callback functions for a UIAction event.

UIAction.UnregisterActionListener( table, callbackFunctionName )
ParameterDescription
tablethe script that receives the callback (can be "self" to refer the current script).
callbackFunctionNamename of the script function that receives the callback. if "" all callbacks for this script will be removed.

UnregisterEventSystemListener

Unregister callback functions for a UIEventSystem event.

UIAction.UnregisterEventSystemListener( table, callbackFunctionName )
ParameterDescription
tablethe script that receives the callback (can be "self" to refer the current script).
callbackFunctionNamename of the script function that receives the callback. if "" all callbacks for this script will be removed.