-
Preloading question
Ok, I have 3 songs for my game, but I don't want the player to have to wait for all 3 songs to download before he plays the game. How do I make it so only one song is loaded, and then when the player starts playing, the other two loops start loading in the background so they are ready to be linked from the library?
Also, I'm not sure if this has to do with Flash, but how do I cut a 3 minute loop down to like 30 seconds? Can I do this directly in Flash.
-
I'm not sure about your first question, but I would imagine you could just use a progressive preloader and start after X sounds have loaded, but keep loading the rest. For your second question, yes its absolutely possible, check the link below.
www.highsocietygames.com/soundTest.html
-
Just load the first tune in with your game ( Either as part of it, which would be easier, or as soon as the game is loaded but before it starts ).
Then just pull in the other two sounds ( Shove them in their own swfs, and have a bit of attach code in them, eg
var song2:Sound=new Sound(this);
song2.attachSound("song2LinkageID");
and then to play them you can just use loadedSong2Container.song2.start(); )
One thing to be careful of is that you shouldn't assume that song2 has loaded and start playing it without a check ( So don't think that just cause it's not needed til level 2, and it'll take the player a minute to complete level 1 that it'll be loaded. Always check ).
Squize.