2007年3月26日星期一

Change the frame rate of your movie[轉]

1.Change the frame rate of your movie

Using ActionScript 3, you can dynamically change the frame rate of your movie using the Stage class.

The Stage class (flash.display.Stage) is the class assigned to the stage object which is accessible from your main movie sprite/movie clip (or others within the same security sandbox) using the stage property. The stage object has a frameRate property which can contain any value between 0.01 and 1000 and determines the frame rate at which the Flash player plays back your movie. Changing this value lets you change the frame rate at runtime.stage.
frameRate = …

ActionScript Code:

// change frame rate to 12 fps:
stage.frameRate = 12;

0 评论: