views:

492

answers:

2

In ActionScript, what's the difference between the SWF header FPS and the Stage FPS? From what I understand, the Stage FPS is initially copied from the SWF header FPS, but is that all the header FPS is for? Can it ever override the Stage FPS?

Just to clarify, I set the header FPS using the SWF metadata tag - [SWF(frameRate="60")] - and the Stage FPS using "stage.frameRate = 60".

Also, where can I find a good description of the way Flash handles the set FPS? I'd like to know if it's a limit, an average, a target, etc.

A: 

there is no difference,

and the description of stage.framerate is here

Tolgahan Albayrak
+1  A: 

uhm, it is two different things ... the first one is included in a well defined place in the swf byte format (namely, the header), and the second one will be compiled to bytecode instructions that have to be executed on the avm in order to take effect ...

if you load an swf into a running swf, than the header framerate of the loaded swf will be completely ignored ...

this is simply historical ... flash player started as software to display animation, and thus size and frame rate had to be included into the file format, like the rest of the animation ... scripting appeared later, and script access to the stage's FPS was not available before flash player 9 ...

but yeah, the effect is similar, most of the time ... :)

concerning the second question: it's the target, if you will ... sometimes, you may get 61-62 FPS, when framerate is at 60, but, it never really exceeds it ... when too much computation power is needed, framerate will drop of course ...

back2dos