I admit I am not overly experienced in flash, and even less experienced with actual actionscript.. Help is definitely appreciated if any is available!
----------------------------------------------------------------------------------------
I am loading external swf's into a main movie/timeline one at a time. Each individual swf is anywhere between 150 to 300kb.
In different frames of the main timeline I am using this code to load each external movie.. (swap all names for each different swf of course)
//actions for frame 315 main timeline
stop();
loadMovieNum("s01x3.swf", 1);
gotoAndPlay("s1");
//actions for frame 630 main timeline
stop();
unloadMovieNum(1);
loadMovieNum("s02x5.swf", 2);
gotoAndPlay("s2");
- //actions for frame 315 main timeline
- stop();
- loadMovieNum("s01x3.swf", 1);
- gotoAndPlay("s1");
- //actions for frame 630 main timeline
- stop();
- unloadMovieNum(1);
- loadMovieNum("s02x5.swf", 2);
- gotoAndPlay("s2");
"s01x3.swf" stands for "scene 1 x 3 photos". I have 5 scenes and 26 photos total to display. If I add all the keyframes up for all of the different swf's it amounts to approximately a couple, to three thousand keyframes. Each swf has its own %preloader on frame 1, with content starting on frame 2, and a stop command on the last frame of each sequence so they don't loop more than once.
The "stop" and "play" commands in the external swf's do not affect the main timeline that I can tell, at least I don't know how to make them..
So my real question revolves around how to use the "main timeline" of the "main movie" with each loaded swf.
I currently have it set up like this:
<example1>
frame 1 - 315 = opening sequence
frame 315 - 630 = load and play s01x3.swf
frame 630 - 1030 = load and play s02x5.swf
frame 1030 - 1200 = load and play s03x2.swf
frame 1200 - etc.. = load and play s04x6.swf
frame etc... - to approximately 2500-3000 keyframes total
</example1>
I am seeing a potential problem with the example1 scenario above, mixed with super slow computer connections.
------ Lets say that if the main timeline is loading one of the external swf's but is also playing along at the same time, what happens if the persons connection is so slow that the main timeline reaches the next loadmovie command before the first movie has finished loading/playing? I'll tell you what happens, bad design/ overlapping frames/ unpredictable behavior..
I need a way to ensure that each swf gets loaded and fully played before continuing on in the main timeline.
I saw the command "ifFramesLoaded()", and it almost seems like the kind of thing that could be implemented here, but I also saw that it is a deprecated function.. I'm not really sure what that means, but from the sound of it I think I'm not supposed to use that function anymore or something.. I never used it to begin with though, don't even know how to yet

..
I am using blank keyframes in my main timeline for the amount of time it takes for each swf to play its keyframes out and then loading the next swf in line. I don't seem to get how you could control the main timeline of the main movie with commands that are on keyframes of the external loaded swf's, or even from commands on the main timeline itself..
It seems like it would be easier if you could set it up this way:
<example2>
frame 1 - 315 = opening sequence
frame 316 = stop, load and play s01x3.swf, goto next frame
frame 317 = stop, load and play s02x5.swf, goto next frame
frame 318 = stop, load and play s03x2.swf, goto next frame
frame 319 = stop, load and play s04 " " "
frame 320 = stop, load and play s05 " " "
frame 321 - 650 = closing sequence, end.
</example2>
Please forgive what you see above, it is not meant to resemble REAL actionscript in very many ways!
In case the meat of my question is unclear now I will clarify it again. How can I shorten the length of the main timeline while also being able to fully stop, load, play, unload, and play each external swf in line without any frame overlaps?
It is a matter of commands and lines of actionscript, and I don't really know the first thing about this end of things.. I see certain lines of script sometimes and it makes sense, but I don't know how to string different lines together to make a proper sequence of actions for my needs..
I admit I am not overly experienced in flash, and even less experienced with actual actionscript.. Help is definitely appreciated if any is available!
My thanks and best wishes to any with the patience and good heart to help. (not that my best wishes don't go out to everyone already!)
Sorry for writing a book here by the way, I felt the need to be detailed in my predicament!
Learn by doing research of course, but it never hurts to ask as well.