How to Identify SWFs FPS in AS3

AS3 is a term commonly used when referring to Flash ActionScript version 3.0. AS3 enables you to write custom code to support and enhance your multimedia movie. A Flash movie contains a time line consisting of frames. The speed at which the movie progresses along those frames is the frames per second. Use AS3 methods to read the FPS of your movie.

Instructions

    • 1

      Open the Flash source file.

    • 2

      Click in frame one and press “F9” to display the Actions window.

    • 3

      Type the following code:
      var fr:MovieClip = new MovieClip();
      addEventListener(Event.ENTER_FRAME,frFunction);
      function frFunction(event:Event) {

      fr.t = getTimer();
      fr.frameRate = Math.round(1000 / (fr.t - fr.o));
      trace(fr.frameRate);
      fr.o = fr.t;

      }
      The trace function displays the frame rate in the output window.

Related Searches

Resources

  • Photo Credit Comstock Images/Comstock/Getty Images

Related Ads

Check It Out

7 Tips for Photographing Your Kids on Halloween