I have one movie with graphics and i want to load the audio using a seperate movie file.
But when i use load (audio movie )at level 1 the initial movie plays before the audio movie is loaded
Printable View
I have one movie with graphics and i want to load the audio using a seperate movie file.
But when i use load (audio movie )at level 1 the initial movie plays before the audio movie is loaded
That is probably because level 1 is still loading while level 0 is playing. You need a more sophisticated setup. I will defer to Johnie on this.
The best way to solve this problem is to use "audio streaming" (not "audio movie").
I agree that streaming it would probably be easier...
If you have to have it loaded you would want to build a Preloader for the Audio Level.
A Basic preloader is going to compare Frames or Bytes Loaded with the Total Frames or Bytes.
You use the _Level#.getBytesLoaded() and _Level#.getBytesTotal() or _Level#._framesloaded and _Level#._framestotal
An Example.
You Create 3 Frames after you use your LoadMovie into Level 1 Action and Label The First one loading and the third One Start.
On the Second Frame you attach this script;
loaded=_level1._framesloaded;
total=_level1._framestotal;
if(loaded==total)
{
gotoandplay("Start");
}
else
{
gotoandplay("loading")
}
You can swap out framesloaded and framestotal with _level1.GetBytesLoaded() and _level1.GetBytesTotal() if you so desire.
Likewise to Debug you can create two text boxes and Call them Total and Loaded.
Thanks guys :)