3D Lingo Dictionary > E-K > keyframePlayer (modifier) |  |

keyframePlayer (modifier)

Syntax

    member(whichCastmember).model(whichModel).keyframePlayer.keyframePlayerModifierProperty

Description

3D modifier; manages the use of motions by models. The motions managed by the `keyframePlayer` modifier animate the entire model at once, unlike Bones player motions, which animate segments of the model called bones.

Motions and the models that use them must be created in a 3D modeling program, exported as W3D files, and then imported into a movie. Motions cannot be applied to model primitives created within Director.

Adding the `keyframePlayer` modifier to a model by using the `addModifier` command allows access to the following `keyframePlayer` modifier properties:

playing indicates whether a model is executing a motion.

playlist is a linear list of property lists containing the playback parameters of the motions that are queued for a model.

currentTime indicates the local time, in milliseconds, of the currently playing or paused motion.

playRate is a number that is multiplied by the `scale` parameter of the `play()` or `queue()` command to determine the playback speed of the motion.

playlist.count returns the number of motions currently queued in the playlist.

rootLock indicates whether the translational component of the motion is used or ignored.

currentLoopState indicates whether the motion plays once or repeats continuously.

blendTime indicates the length of the transition created by the modifier between motions when the modifier's `autoblend` property is set to `TRUE`.

autoblend indicates whether the modifier creates a linear transition to the currently playing motion from the motion that preceded it.

blendFactor indicates the degree of blending between motions when the modifier's `autoBlend` property is set to `FALSE`.

lockTranslation indicates whether the model can be displaced from the specified planes.

positionReset indicates whether the model returns to its starting position after the end of a motion or each iteration of a loop.

rotationReset indicates the rotational element of a transition from one motion to the next, or the looping of a single motion.

Note: For more detailed information about these properties, see the individual property entries.

The `keyframePlayer` modifier uses the following commands:

`pause()` halts the motion currently being executed by the model.

`play()` initiates or unpauses the execution of a motion.

`playNext()` initiates playback of the next motion in the playlist.

`queue()` adds a motion to the end of the playlist.

The `keyframePlayer` modifier generates the following events, which are used by handlers declared in the `registerForEvent()` and `registerScript()` commands. The call to the declared handler includes three arguments: the event type (either `#animationStarted` or `#animationEnded`), the name of the motion, and the current time of the motion. For detailed information about notification events, see the entry for `registerForEvent()`.

`#animationStarted` is sent when a motion begins playing. If blending is used between motions, the event is sent when the transition begins.

`#animationEnded` is sent when a motion ends. If blending is used between motions, the event is sent when the transition ends.

See also

`addModifier`, `modifiers`, `bonesPlayer (modifier)`, `motion`