Adjusting frame rate of imported movie

Hi

I’m really new to flash and am having some trouble. I have been searching around for a while now trying to figure out how to adjust the frame rate of an imported movie so that it would run in its intended fps rate, and not at the same rate as the presentation in which is importing it. (To be more specific, my main presentation runs at 1 fps, but the intro movie I want to add runs at 20 fps). Anyway, along my travels, someone pointed me towards the code at http://jeremydecker.s5.com/play_control.fla. I have since downloaded it and tried to get it to work. As it turns out, I know so little about flash and actionscript programming that I am unable to get it to work properly!

According to the comments in the code, it is executed by calling the fPlayControl() function, which has the following syntax:
_levelN.fPlayControl(_root.mcMovie,nFPS)

where (quoting now)
“‘N’ is the level number of where this swf is loaded and ‘mcMovie’ is a movie clip on the _root timeline of the movie that is calling this function and ‘nFPS’ is a number between 1 and 120.”

I don’t even know what levels are! Are they layers? Thus, the first layer is level 0? Then the next layer is level 1? Next, how do I give an imported movie a name so that I can call this function with the movie’s name as parameter? I tried importing a movie into the library, and then giving it a name, but I still couldn’t get the bloody thing to work. :stuck_out_tongue:

My steps to attempt to get this to work: I opened the play_control.fla file, and chose “Import to library…” I then selected my little intro movie, and then I brought up the library, and renamed it. I also choose the “Export for ActionScript” option, which automatically hilighted one or two other options (I have no idea if that was necessary…I’m just guessing here!) Then I added this one line after all the other ActionScript code:

_level0.fPlayControl(_root.myintro,1);

(I had named the intro movie in the library “myintro.” I was trying 1 fps for now just to be sure I would know if it worked because it would move really slowly).

Anyway, after doing that, nothing came up. Then I added another layer and inserted the intro movie from the library into it and played the movie again. This time the intro played, but it zoomed along (at I’m assuming 120 fps, which is what the speed is set to in the demonstration file I downloaded). Thus, it still wasn’t working.

Any help would be really appreciated.

Maybe this thread will help (Flash MX ONLY!)

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=9475

Thanks a lot. I had to modify the code a little (I added updateAfterEvent()), and I also figured out how to use clearInterval() to return the normal frame rate.

However, I have another question: I want my flash movie to stop automatically proceeding after a while (i.e. I want the frame rate to halt, and then have it proceed frame by frame by clicking the mouse or pressing a button or something). Do you have any idea how to do that?

Thanks a lot!

Use a stop() action on the frame you want it to stop on.

Then use a gotoAndStop(_currentframe+1) to proceed to the next frame. You can do this in an on(release) on a button or something.