Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preload scenes/clips with different Frame Rates...?

Status
Not open for further replies.

sagesmith

Programmer
Jun 18, 2002
3
US
I have 2 movies, and I want to load the second with the first. I do this with a MovieClip and it loads, however is plays with the first movies framerate of 12 fps when its own frame rate is .3 fps.
I've tried to bypass the first movie as a preloader by adding a scene to the second movie. This solution is ok but I'm still stuck at .3 fps for the loading scene (not very cool).
If there is any way to manipulate fps with AS or another preloading option please let me know. Thanks in advance!
 
You can't run different framerates in the same SWF object. When you embed a SWF in HTML you are basically creating a stack, into which you can load other SWFs if you want. However, certain parameters are set by the named SWF, which will load into level 0. These include stack size (physical dimensions), background colour, and ... framerate. You can't play a loaded movie at a different frame rate.

The only thing I could suggest is that since the slower framerate is easy to calculate off the main (12/.3 = 40: 1 frame at 12 fps is equal to 40 frames at .3 fps), you could just compensate by spreaing the content out over the timeline more. That way, compared to the main movie (or the preloader or whatever it is) your .3 fps movie will look INCREDIBLY slow. As is the desired effect, no?
 
Thanks rg, I'm looking for ANY sloution other than that...but, if worse comes to worse, I will extend the 120th frame to 48,000 and extend each one out from there (urgh!!).
 
What about making a counter clip which counts the number of frames that have passed in the main movie and move the slower movie on at the right place? For example:

Main movie: 12 fps - counter(MC symbol) with this script:

onClipEvent(load){
var counter = 0
onClipEvent(enterFrame){
if (counter == 40){
_level1.nextFrame()
counter = 0
}else{
counter ++
}
}

Slower movie: 12fps - loaded in level 1 - stop() in frame 1.

This way when 40 frames have passed in the main movie, the slower movie will advance 1 frame. If you have movieClips in the slower movie, things could get a little hairy - more scripting would be needed to control that, but it could syill be done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top