Actionscript 3.0 Frame Rate Tutorial Script Flash to Speed or Slow Animations at Runtime



Source: http://www.developphp.com/video/Flash/Frame-Rate-Tutorial-Script-Flash-Speed
Use Actionscript 3.0 in Flash to script your animation frame rates to put the animation speeds under the control of the viewer.

stage.frameRate = 30;

source

27 thoughts on “Actionscript 3.0 Frame Rate Tutorial Script Flash to Speed or Slow Animations at Runtime”

  1. if i set the AS speed to 30 for one area and then i want it go back to the normal file fps in another area, what is the AS for that command?…is it stage.frameRate = normal; ?

  2. No, there is only one framerate that your flash file runs on. To Speed up movieclip, you have to run special written function that will player every even frames of movieclip, or every 5, to speed up 5 times.
    function doubleSpeed():void
    {
    this.gotoAndStop(this.currentFrame + 2);
    }
    somothing like that 🙂

  3. Hi, just an update on my comment, I did some research and found that it's impossible to have two different objects frame rates in the same stage. However I found there is something called a Timer class, but I have no idea how even begin to use it to slow down an object within another, would you? thanks

  4. Hi, this is really good,but i was hoping if you could explain how to change the FPS of objects within objects. For example If you click on Bionic speed and she had a movie clip of animated eyes they would also blink faster. how could you have it so that her body is going at 60FPS but her eyes would stay at 30FPS? thanks you

  5. could i do a twist on that, and instead do a perspective type of thing, sort of alfred hitchcockian background zoom in and zoom out as she speeds up and slows down? That way the background would never really change speed, but she would seem to be running faster.

    This is typically done in games, to simulate a much faster pace, they extend perspective to simulate super speed.

Leave a Reply

Your email address will not be published. Required fields are marked *