User Guide

786 Chapter 14: Properties
frameRate
Usage
-- Lingo syntax
memberObjRef.frameRate
// JavaScript syntax
memberObjRef.frameRate;
Description
Cast member property; specifies the playback frame rate for the specified digital video, or Flash
movie cast member.
The possible values for the frame rate of a digital video member correspond to the radio buttons
for selecting digital video playback options.
When the frameRate member property is between 1 and 255, the digital video movie plays
every frame at that frame rate. The
frameRate member property cannot be greater than 255.
When the frameRate member property is set to -1 or 0, the digital video movie plays every
frame at its normal rate. This allows the video to sync to its soundtrack. When the frameRate is
set to any value other than -1 or 0, the digital video soundtrack will not play.
When the frameRate member property is set to -2, the digital video movie plays every frame
as fast as possible.
For Flash movie cast members, the property indicates the frame rate of the movie created in Flash.
This property can be tested but not set.
Example
This statement sets the frame rate of the QuickTime digital video cast member Rotating Chair to
30 frames per second:
-- Lingo syntax
member("Rotating Chair").frameRate = 30
// JavaScript syntax
member("Rotating Chair").frameRate = 30;
This statement instructs the QuickTime digital video cast member Rotating Chair to play every
frame as fast as possible:
-- Lingo syntax
member("Rotating Chair").frameRate = -2
// JavaScript syntax
member("Rotating Chair").frameRate = -2;
The following sprite script checks to see if the sprites cast member was originally created in Flash
with a frame rate of less than 15 frames per second. If the movie’s frame rate is slower than 15
frames per second, the script sets the
playBackMode property for the sprite so it can be set to
another rate. The script then sets the sprites fixedRate property to 15 frames per second.