I am trying how to figure out how to load audio and have it ready for after the preloader. I had it export for actionscript before but it loads before the preloader starts which really elimates much of the need for the preloader. I took off the linkage for it to load for frame 1.
I search the forums and saw that a few people recommended following link
http://senocular.com/flash/tutorials/preloading/
in particular the loading complications section.
I tried to follow what was said but it did not say what specific code to put in the section between the preloader and the begin movie section.
whatever I put seemed to not be recognized because the frame gets skipped in the playHead. But reguardless, the logic from that page seemed as if that should not matter and that it can be skipped, it just needed to be in the code.
If I put it right before the preloader, the rest of the movie would have loaded and started playing because the preloader already loaded the last frame, even though the sound did not.
I am looking for either code to put in the that area between the preLoader and the beginig of the movie or code that will let me test if both the swf if loaded and this audio.
I hope I made sense.
My code for that area inbetween that area right now is
var s40:Sound = new Sound();
s40.attachSound("s1940");
but I have also swapped it with this sometimes
s40 = new Sound(s1940);
s40.loadSound("1940.mp3", false);
in which s1940 is what I have in the export for ActionScript linkage. (I have the mp3 with the swf as well)
I just want this audio to load while the preloader is going on, and only after the audio is done loading, let the movie begin
my preloader code right now is this:
this.total_bytes = _root.getBytesTotal ();
this.loaded_bytes = _root.getBytesLoaded ();
this.remaining_bytes = total_bytes-loaded_bytes;
this.percent_done = int ((loaded_bytes/total_bytes)*100);
bar.gotoAndStop (percent_done);
ifFrameLoaded ("main") {
gotoAndPlay ("start");
}
Thanks so much for the help.