Adobe ATMOSPHERE User Manual page 364

Table of Contents

Advertisement

352
APPENDIX E
// Pause the time element prior to setting the time
timeElem.pauseTime = true;
time
The time used to evaluate the animation when timeElem.pauseTime and timeElem.running are both set to true.
// Evaluate the animation at time 1.5 seconds
timeElem.time = 1.5;
timeIncrement
The timeIncrement used to update the animation when pauseTime and running are both set to true. It is best to
leave this value at zero when evaluating an animation directly using time in a script.
// Increment the time by 0.0 per frame
// since we update time in the script
timeElem.timeIncrement = 0.0;
speed
The speed at which the animation is to play back when running. This value may be changed continuously such
as when adjusting walking speed.
// Play back the animation at 70% of the normal speed
timeElem.speed = 0.7;
duration
If the TimeElem has a metatype of 'kgrp' then it is a keyframe group and has a corresponding duration given by
this property.
// returns the duration as a fl oat in seconds
walkTime = timeElem.duration;
running
The fl ag to control whether the animation is currently running.
// Set the time element to run
timeElem.running = true;
Methods
start()
Tells the time element to increment time with each frame update and to evaluate itself.
timeElem.start ();
stop()
Tells the time element to no-longer increment time with each frame update.
timeElem.stop ();
rewind()
Sets the time value for the time elements to the beginning of the interval but does not evaluate the time element.

Advertisement

Table of Contents
loading

Table of Contents