Lingo Dictionary > D-F > frameRate

 

frameRate

Syntax

member(whichCastMember).frameRate
the frameRate of member whichCastMember

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:

member("Rotating Chair").frameRate = 30

Example

This statement instructs the QuickTime digital video cast member Rotating Chair to play every frame as fast as possible:

member("Rotating Chair").frameRate = -2

Example

This sprite script checks to see if the sprite's 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 sprite's fixedRate property to 15 frames per second.

property spriteNum
on beginSprite me
	if sprite(spriteNum).member.frameRate < 15 then
		sprite(spriteNum).playBackMode = #fixed
		sprite(spriteNum).fixedRate = 15
	end if
end

See also

fixedRate, movieRate, movieTime, playBackMode