Help - Search - Member List - Calendar
Full Version: sound loop problem
WorkTheWeb Forums > Webmaster Resources > Macromedia Flash
Support our Sponsors!
Dwayne Epps
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_
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
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_
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
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.



PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.