This content has been marked as final. Show 4 replies
If your problem is only caused by the video then the best solution would be to link to external FLVs. They don't resides in the SWF, they load when needed, they stream, they're marvelous.
Flash 8 provides a video converter. Sorenson Squeeze has a better one for $100
If you cannot use FLVs, you would then need 2 empty movie clips as place holder, 3 if the user can go back to a previous chapter.
Preload the first movie in clip 1, once loaded preload the second movie in clip 2, when clip 2 starts playing preload the third movie in clip one, etc...
If youi provide back navigation then it is a bit more twisted but not that hard to do.
Load swf 1 into clip 1, once loaded load swf 2 in clip two, once 2 is playing load swf 3 in clip 3, once swf 3 is playing load swf 4 in clip 1, if user goes back to clip 2 load swf 1 in clip 1, ect...
But, FLVs are really the way to go. You could then load it all at once and play the videos with no delay in the loading of the SWF(s) and no delays in playing the videos.
Sure it's possible. And you can load chapter 3 when the user views chapter 2 and so on. And you do it with one instance of the MovieClipLoader Class. In Flash hit F1 and search for MovieClipLoader. Enough info there or dive into actionscript.org or kirupa.com or... there are loads of tutorials out there.
1) Unfortunately, I am working in Flash MX (not 2004) so the MovieClipLoader Class is unavailable to me. So, that may be an insurmountable obstacle right off the bat.
2) My problem isn't just video. Really, the problem is the file size of the SWFs, you put enough frames in a SWF (even if it's all vector) and you're going to have largish files. I mean, I'm not dealing with a couple hundred frames... I'm dealing with MINUTES worth, thousands of frames per SWF. So, I definitely need to have external SWFs and not just FLVs, because it's not just video, it's animations over video etc.
3) I knew I would have to have several placeholder movie clips, I guess I'm just not sure about how to construct the actrionscripting to accomplish what I want...
I guess what I mean is, I'm not sure of the logic I should use...
Should I create a function on the Main timeline that will load the movies? Will the function be able to run while the user plays Chapter 1?
I can't just put the script: placeholder2_mc.loadMovie("Chapter2.swf")
on a frame in Chapter1.swf, because then the playback will hitch.
That certainly complicates things a bit more. You really need to consider an upgrade.
The general principle: if the Chapter swf's have preloaders, instruct the preloader to set a var in the Main.swf - like chapter1=0 - to 1 (true); using the syntax _level0.chapter1=1;
Now you need a setInterval in Main.swf that tracks what is happening to the chapter1 var. Call a function in the setInterval that checks whether chapter1==1 and if so, instruct the Main.swf to load the next chapter. To make the function reusable you can setup an array of the chapters and use the array index to track whether a chapter has loaded.