Different Frames Per Second

Is it possible to have two different movie speeds for different movie clips in a flash site. Ya know like load a movie that has a faster frame per second than the main site? I’ve tried this and it always makes them the same speed. Maybe i’m doing something wrong or its just not possible. seems like it should be.



A new thing in MX called setInterval I believe allows you to do that.

I don’t know much about it, but it is a point in the right direction if it helps any.


Flash Player 6.


setInterval( function, interval[, arg1, arg2, …, argn] )
setInterval( object, methodName, interval[, arg1, arg2, …, argn] )


function A function name or a reference to an anonymous function.

object An object derived from the Object object.

methodName The name of the method to call on the object parameter.

interval The time in milliseconds between calls to the function or methodName parameter.

þarg1, arg2, …, argn Optional parameters passed to the function or methodName parameter.


An interval identifier that you can pass to clearInterval to cancel the interval.


Action; calls a function or a method or an object at periodic intervals while a movie plays. You can use an interval function to update variables from a database or update a time display.

If interval is less than the movie frame rate (for example, 10 frames per second (fps) is equal to 100 milliseconds), the interval function is called as close to interval as possible. You must use the updateAfterEvent function to make sure that the screen refreshes often enough. If interval is greater than the movie frame rate, the interval function is only called each time the playhead enters a frame in order to minimize the impact each time the screen is refreshed.

The first syntax example above is the default syntax for the setInterval function in the Actions panel in normal mode. To use the second syntax example, you must use the Actions panel in expert mode.

Well yeah, I knew that, but I don’t know how to make it change the FPS for each loaded movie.

it doesn’t look like that controls the rate at which the movie is played.

although i suppose you could put stops on all the frames and tell it to nextFrame(); at a certain setInterval. seems a bit lengthy to do. if i were up against this problem, i would probably change the length of the animations in the movies so that they ran they way i wanted with the same fps or i would load the movies on different pages, since each movie would be in a seperate loaded page, they could each have their own fps rates.

hope this helps =)

Try something like this…

function playNextFrame(){
setInterval(playNextFrame, 1000/12); 

Where 12 is the Frames per second you want it to play.

I have no clue, but it might work…LOL.

i wrote a utility in flash 5 that allows you to control the frame rate of all movies. i will update it in flash mx and post here.

lol lost

i think that or something like that would work, but i think that it would make the movie really laggy having to run that script each and every frame, changing the rate of the movie itself and even if you were changing the framerate of the main timeline the symbols on it would still run at whatever fps the movie is set to. so you’d have to put that script in every mc … shrug =)

Or put it on 1 frame in the _root timeline, then at the end of the movie hit insert frame so the frame stretches from 1 to the other.

It works :slight_smile:

Check my example and see how it works.

I have the FPS set to 30, but the code set to 1000, test the movie and see it, then remove the code, it goes slower.

you da man lost =)

it’s a bit choppy, but i really think thats the best that can be done without changing all the animations manually

good job =)

Thanks :slight_smile:

For some reason I keep thinking I saw that somewhere before, but I don’t remember where, or if I even really did…lol… it just popped into my head.

Wow. Thanks for the help guys. I need to learn a little more about actionscripting. Maybe then I could figure these things out by myself. Again I really appreciate it.

question for you two. Or anybody. What is the best way to import images into Flash from Photoshop to keep the quality without getting fuzzy. i’ve been using png to keep transparency. would using a alpha channel as a mask and importing that psd into After Affects and then saving as a .swf in after affects keep the quality better?

Save as the highest quality from Photoshop, import into Flash, right click on the image in the Library. Choose properties, uncheck the smoothing option and mess with the compression settings :slight_smile:

Thanks again. Your my hero.:slight_smile:

Lol, no problem, I had the same problem with the pics in my flash footer, they are .pngs.