Skip to main content
Participant
April 19, 2006
Question

how to get fps of a movie clip?

  • April 19, 2006
  • 1 reply
  • 297 views
a bit of a newbie question

how do i find the fps of a movie clip in actionscript?

cheers
bhu
This topic has been closed for replies.

1 reply

Inspiring
April 19, 2006
If you mean an external FLV movie? .. then use the metadata.

If you mean an external SWF you loaded? .. you can't. And it is ignored
when you load it in anyway.

If you mean a movie clip already in the movie .. it will be the same as the
whole movie .. and you cannot find the nominal FPS of a movie.

You can calculate the actual fps be simply using an onEnterFrame and
getTimer to see how long it takes to execute each frame.

Question: Why do you even need to know?
--
Jeckyl


kglad
Community Expert
Community Expert
April 20, 2006
jeckyl, i have a question for you: if you define a named (as opposed to an anonymous) function within an if-statement (or another function block), it will not be defined even though that conditional executes. for example, the code below results in nothing in the output panel.

i think this is because named functions are compiled before other script in the same location. conditional statements are skipped during this first pass looking for named functions. when the compiler makes a second pass and compiles the remaining code and hits a named function, it skips past that named function because it's no longer dealing with named functions. true?