Dwayne Epps
Oct 6 2003, 02:58 AM
I've encountered a problem with looping a dynamically loading MP3 file. The
sound will not loop when it reaches the end as specified to loop 99 times in
the script:
bgSound = new Sound(this);
bgSound.loadSound("train_to_catch.mp3", true);
bgSound.start(0, 99);
I loaded the sound dynamically rather than using an event sound because of
load time. Is there a way to correct this? Thanks in advance for any help.
-D-
urami_
Oct 6 2003, 03:29 AM
QUOTE |
I've encountered a problem with looping a dynamically loading MP3 file. The sound will not loop when it reaches the end as specified to loop 99 times in the script:
bgSound = new Sound(this); bgSound.loadSound("train_to_catch.mp3", true); bgSound.start(0, 99);
I loaded the sound dynamically rather than using an event sound because of load time. Is there a way to correct this? Thanks in advance for any help.
|
That's because 'true' make the sound STREAM , stream nature is to play as it buffers and dump
the audio once it's done , just like online video or any other streaming content... You can't loop unless load all over again.
Regards
urami_*
<lsym>
There's no place like 127.0.0.1
</lsym>
Dwayne Epps
Oct 6 2003, 03:32 AM
Thanks urami_
Being a novice to actionscript, would any looping statements work to
load the sound again when the sound clip ends to load it again? Thanks for
the help.
"urami_" <[Email Removed]> wrote in message
news:[Email Removed]...
QUOTE |
I've encountered a problem with looping a dynamically loading MP3 file. The sound will not loop when it reaches the end as specified to loop 99 times in the script:
bgSound = new Sound(this); bgSound.loadSound("train_to_catch.mp3", true); bgSound.start(0, 99);
I loaded the sound dynamically rather than using an event sound because of load time. Is there a way to correct this? Thanks in advance for any help.
That's because 'true' make the sound STREAM , stream nature is to play as it buffers and dump the audio once it's done , just like online video or any other streaming content... You can't loop unless load all over again.
Regards
urami_*
<lsym
There's no place like 127.0.0.1
</lsym |
urami_
Oct 6 2003, 06:23 AM
QUOTE |
Thanks urami_ Being a novice to actionscript, would any looping statements work to load the sound again when the sound clip ends to load it again? Thanks for the help.
|
you could just set it back to event , instead of TRUE write FALSE
But take note unlike Stream sound , Event must load entirely in order to play
but than it can be loop for as many times as you want.
tralfaz
Oct 6 2003, 06:53 AM
You can use onSoundComplete to restart the streaming music when it
finishes...
s = new Sound();
s.loadSound("sound9.mp3",true);
s.onSoundComplete = function () {
s.loadSound("sound9.mp3",true);
}
You will get a short pause in the sound between each reload.
tf
"Dwayne Epps" <[Email Removed]> wrote in message
news:blqrq0$60c$[Email Removed]...
QUOTE |
Thanks urami_ Being a novice to actionscript, would any looping statements work to load the sound again when the sound clip ends to load it again? Thanks for the help. |
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.