View Full Version : Sound Loop
neverrain
October 20th, 2003, 10:47 AM
Hi,
Does anyone know the code to loop an externally loaded sound? The loop is about 5 seconds but I would like to loop it 30 times making it much longer.
Here is my code to load it.
on (press) {
stopAllSounds();
}
on (release) {
mySound = new Sound();
mySound.loadSound("music/ambient.mp3", true);
}
Thanks.
eki
October 20th, 2003, 10:56 AM
mySound.start(0, 30);
(first make sure it has loaded!!!!)
neverrain
October 20th, 2003, 11:09 AM
Not to come off rude to you, but yes I know that code, I tried it and it gave me a script error.
neverrain
October 20th, 2003, 11:13 AM
ok now the error is gone but the soun doesn't loop.
Here is the code now.
on (press) {
stopAllSounds();
}
on (release) {
mySound = new Sound();
mySound.loadSound("music/rock.mp3", true);
mySound.start(0, 30);
}
kode
October 20th, 2003, 11:44 AM
http://www.kirupaforum.com/images/search_top.gif (http://www.kirupaforum.com/forums/search.php?s=)!! ;)
mySound.onSoundComplete = mySound.start;
neverrain
October 20th, 2003, 11:56 AM
Do you mean?
mySound.onSoundComplete = mySound.start(0, 30)
kode
October 20th, 2003, 11:58 AM
Nope, I mean:
mySound.onSoundComplete = mySound.start;
:P
neverrain
October 20th, 2003, 02:35 PM
well alas no luck. :(
Here is the code:
on (press) {
stopAllSounds();
}
on (release) {
mySound = new Sound();
mySound.loadSound("music/techno_dance.mp3", true);
mySound.onSoundComplete = mySound.start;
}
kode
October 20th, 2003, 02:48 PM
The code seems to be fine... attach your FLA so I can see what's wrong. ;)
neverrain
October 20th, 2003, 06:34 PM
Here ya go Koge. ;)
kode
October 20th, 2003, 08:08 PM
Done. ;)
neverrain
October 20th, 2003, 09:25 PM
well thanks for the fla update Kode but yet it still doesn't loop the sound.
Define Loop: The Sound loop (5 seconds) playing over and over by a specifed number.
Is that what you did and I am missing something or?
kode
October 20th, 2003, 09:28 PM
Ok... that's weird. I tested it and it worked just fine!! :(
neverrain
October 20th, 2003, 09:58 PM
hmm well I wouldn't lie. lol
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.