This content has been marked as final. Show 4 replies
this could be caused by a swf that starts to play before it's completely loaded or whose play is interrupted by a loading external file that's needed for the swf to continue.
Hello and thank you for your help. I still don't understand why the inconsistent behavior--is that related to bandwidth or the version of the Flash player? Anyway, if you don't mind, could you please have a [what I hope will be a] quick look at the preloader code, to see if anything looks like it might be causing a problem? Also, I think the problem might be related to later in the test when the movie loads other swfs in the background while the movie is playing. Would it be possible for the movie to finish the scene before the swfs have been fully downloaded for the next scene? When the movie moves to the next scene, would it stop the background loading. If this is causing problems, then would it be better to load ALL swfs needed for the movie in the pre-loader? I thought I would save on loading time, if I only loaded the first couple sections at the beginning and loaded the other sections later. Anyway, preloader code:
if that's preloader code only, you're doing something wrong.
Also, I think the problem might be related to later in the test when the movie loads other swfs in the background while the movie is playing. Would it be possible for the movie to finish the scene before the swfs have been fully downloaded for the next scene?
yes, external file loading is 'asynchronous', meaning you can start the load and before it finishes (or even starts to load), you can continue to execute subsequent code and timelines will continue to play. if you move to another scene you are going to remove everything not created with actionscript.
Hello and thanks again for your comments.
OK maybe I was wrong when I set up the whole thing. You see each section has audio and images and they must be synchronized. So, I put each mp3 (audio for each test question) in a blank mc and exported each one as a swf. I did the same for each of the images needed to go with the audio (each image in a little swf). I figured then I would have the audio and images available to put in the test where they need to be and to be played when they need to be played.
The code above essentially loads necessary swfs for the first section and then starts to play.
I have been away from Flash for a while, but when I designed the test and did the research, I thought (for some reason) it would be better to set things up this way rather than embed all of the audio files and images in the movie library itself (correct me if I'm wrong, please). From a design standpoint and for reliability, would it in fact be better to have all of the gifs and audio in the movie's library and export the whole thing. Then, I would just load the one big movie, instead of all the external swfs and then I wouldn't have these problems, right?
Alternatively, I assume I could pull all the code that is executed later and that loads other external swfs for subsequent scenes and put all of that with the "preloader" I already have.
As I said, I would say the test works fine about 90-95% of the time, and I don't really want to rewrite everything from scratch but would like to have more reliability that it will not hang. Any suggestions on what to do for this?
Thanks for your input--