Adds an action file to a model instance and returns an actionSequence object.

AddAction indicates you want to play the given action on the model specified. This command is the only way to 'link' an action with a model. You can use the same action and model on multiple 'addAction' commands. There is a difference however in adding the same model multiple times, or adding the same action multiple times. The model is what you see in the 3D-web player. After adding it to several scripts, you still have only one model. What you will be doing is playing multiple actions on this model simultaneously.

This differs to adding the same action to multiple models. This will not cause all models to move simultaneously. You can acheive this effect by starting all sequences/scripts at the same time, but this is by no means neccessary. You have in fact total control over each instance seperately through each actionSequence object.

The actionSequence object allows you to set all parameters driving the animation of this single action on the model. For example the time the action starts playing must be set. Other parameters such as action looping etc. are all set through this object.

Syntax:

actionSequence addAction(String actionname, model modelinstance)
Return: an actionSequence object
Parameters:
actionname

The short name of the action you want played. You must first load the action through a call to arcticDocument::loadAction but it is not necessary to wait for the download to have completed.

modelinstance

The model object that will be playing the action. You create the model instance through a call to script::addModel.

See also:

Class script | Class actionSequence | Class model | Class modelFile | Class actionFile |

 

©2000 arcticpigs. All rights reserved.
This is a draft version! The functionality of parts of the software are liable to change.