-
want to dynamically load a sequence of SWFs into a movie.
each movie is called inf1.swf... inf2.swf etc.
so I create a loop with "i":
loadMovie ("inf"+i+".swf", "_root.loader");
but.. how do I check if the SWF is fully loaded, so I can i++ and load the next one in the sequence?
I tried onClipEvent(data), but I think the SWF is streaming the data, because it registers as TRUE as soon as the SWF loads in..
anyone .... anyone....?
-
you need a preloader in there somewhere. i don't think you can load multiple swfs at the same time, they need to be loaded one at a time. something has to tell your script that one movie is loaded and the next one is ready. guess you know that, not sure how exactly to preload and communicate with the loading loop...shouldn't be too hard to figure out.
-
hmmmm
was thinking.. I reckon I could just use bytesloaded to figure out when each movie in the sequence is loaded in.. but.. of course, if the page was cached, this system would fail.. so .. I suppose I will have to delete cache onLoad the HTML..
hmmmmm...
might work..
-
hi,
from your last post it seems that you want to check when the external swf has finished playing, is that true?
In that case, create a function that will load the next swf, use a variable to keep track of which swf is next and trigger the 'load next' from the last frame of the external swf, something like so:
Code:
// frame 1
movies = ["inf1.swf","inf2.swf","inf3.swf"];
nextMovie = 0; // array index of next movie
function loadNextMovie ()
{
if(nextMovie >= movies.length)
{
trace("no more movies to load!");
return;
}
// load next movie
_root.loader.loadMovie(movies[nextMovie]);
nextMovie++; // move along to next movie
}
// last frame of each external movie
_root.loadNextMovie();
(you may want to insert a blank frame after the last 'real' frame of each external swf and place the code on that, so that the actual last frame is displayed).
- n.
-
thanks. reckon that'll do it nicely. : ]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|