;

PDA

Click to See Complete Forum and Search --> : Help with loading seperate movies


Kelspalace
11-06-2002, 07:47 AM
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

Bob Hartzell
11-06-2002, 08:29 AM
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.

necromanthus
11-06-2002, 06:13 PM
The best way to solve this problem is to use "audio streaming" (not "audio movie").

johnie
11-06-2002, 08:59 PM
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.

Kelspalace
11-07-2002, 05:29 AM
Thanks guys :)