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.
system
2
mySound.start(0, 30);
(first make sure it has loaded!!!)
system
3
Not to come off rude to you, but yes I know that code, I tried it and it gave me a script error.
system
4
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);
}
system
5
!! 
mySound.onSoundComplete = mySound.start;
system
6
Do you mean?
mySound.onSoundComplete = mySound.start(0, 30)
system
7
Nope, I mean:
mySound.onSoundComplete = mySound.start;

system
8
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;
}
system
9
The code seems to be fine… attach your FLA so I can see what’s wrong. 
system
12
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?
system
13
Ok… that’s weird. I tested it and it worked just fine!! 
system
14
hmm well I wouldn’t lie. lol