Categories

How to change the speed in flash

Template-help.com Team November 15, 2010
Rating: 5.0/5. From 1 vote.
Please wait...
Q: How can I speed the frame rate or slow it down when the movie is playing? For example, I would like to slow the frame rate from the default of 20 fps to 15 fps from frame #80 to frame #150. Then frame rate should speed back up to 20 fps after frame #151, (fps = frames per second). A: One way is to use “interval”. An example of changing the speed of the movie from frame #80 to frame #150 is shown below. Create a key frame at frame #80 and place this script:
var fps:Number = 80; var intervalID:Number = setInterval(this, “advanceFrame”, 1000/fps); stop(); // function advanceFrame() { clearInterval(intervalID); gotoAndStop(_currentframe+1); if (_currentframe<151) { intervalID = setInterval(this, “advanceFrame”, 1000/fps); } else { play(); } }
This entry was posted in General tutorials, Working with Flash and tagged animation, flash, speed. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket