-
!!! Multiple sounds preload B4 the start of the movie.
Hi, there Flash gurus...
I am time stressed and quite desperate with the following problem. I
hope that'll be a snack for you to lead me out of this.
HERE IS WHAT I HAVE:
I am to create a product demo, I decided to have one movie with
series of scenes which are to play in order.
For individual scene there is a corresponding sound ( voice ),
let's say I will handle 8 sounds.
I decided to preload them
before the first scene starts and then call them one-by-one
at beginning of each next scene.
PLEASE, how can I achieve this so that when a first scene ends
the relevant sound stops too and second scene starts with second
sound....and so on...???????
Thanks a lot
ROBERT
-
have you tried placing a stopAllSounds() action in the last frame of each scene?
-
RE: Sound problem ...
Thanks a lot. Actually, I want to preload all the sounds before the movie starts. The sounds will be probably external .swf files.
Can I preload more that one .swf file at one time?
If yes, how can this be done, please? ( I have certain guesses but
I want to be sure )
Here is the preload ascript I wwould like to add the preloading
of sounds to ( or must this be done separately?):
Frame 1:
iStatus=0;
setProperty("pBar",_xscale,0);
Frame 2:
iBytesTotal = _root.getBytesTotal();
iBytesLoaded = _root.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;
iBytes = (iBytes-(iBytes%1));
setProperty("pBar", _xscale, iBytes);
sStatus=iBytes add "%";
Frame 3:
if (iBytes<100) {
//iBytes=iBytes+2;
gotoAndPlay(2);
} else {
sStatus='done'
gotoAndPlay(4);
}
Frame 4:
sStatus='done'
gotoAndPlay(5);
Thanks a million
ROBERT
-
you can load multiple SWF at once but it will be awkward to track load progess of all of them in one script or one message.
an alternative would be to load sounds sequentially, and show load progress for each as it loads.
Your script above is intended to show the load progress of the SWF it is contained in.
I suppose, as long as the audio loads after the script, you could put this script in the first few frames of each external SWF and display the load progress message. As each SWF loads it will run its own load progress message or animation.
You might consider running a variation of this script from the main movie and have it track sounds as they load into a movie clip. You would not have to add the script to each SWF and you could tie this script in with sequential load.
so for example you call load movie then start the timeline loop running to track load of a swf.
if sStatus=='done' then the SWF is finished loading, call loadMovie again with the next SWF and restart the timeline loop.
You would have to change the script to point to your the timeline you are loading sounds into.
_root.getBytesTotal();
would become
targetpathtomc.getBytesTotal();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|