fixedRate

Usage

-- Lingo syntax
memberOrSpriteObjRef.fixedRate

// JavaScript syntax
memberOrSpriteObjRef.fixedRate;

Description

Cast member property and sprite property; controls the frame rate of a Flash movie or animated GIF. The fixedRate property can have integer values. The default value is 15.

This property is ignored if the sprite's playbackMode property is anything other than #fixed.

This property can be tested and set.

Example

The following handler adjusts the frame rate of a Flash movie sprite. As parameters, the handler accepts a sprite reference, an indication of whether to speed up or slow down the Flash movie, and the amount to adjust the speed.

-- Lingo syntax
on adjustFixedRate(whichSprite, adjustType, howMuch)
   case adjustType of
      #faster:
         sprite(whichSprite).fixedRate = sprite(whichSprite).fixedRate + howMuch
      #slower:
         sprite(whichSprite).fixedRate = sprite(whichSprite).fixedRate - howMuch
   end case
end

// JavaScript syntax
function adjustFixedRate(whichSprite, adjustType, howMuch) {
   switch(adjustType) {
      case "faster":
         sprite(whichSprite).fixedRate = sprite(whichSprite).fixedRate + 
howMuch; break; case "slower": sprite(whichSprite).fixedRate = sprite(whichSprite).fixedRate -
howMuch; break; } }

See also

playBackMode


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/director/mx2004/release_en/09_pr244.htm