I got a sound to work in my actionscript for a flash movie. But when i put the loop in that frame it doesnt work, where do i want to put the onSoundComplete loop in the flash?
And I want to know if there is a way to make the onSoundComplete loop only loop 1 sound, rather then looping all the sounds in the scene.
nope, that doesnt work because i want the sound to be an infinite loop. if the sound is like 2 seconds long i wanna have it looping on an infinit track, I cant figure out how to do this because if i put the onSoundComplete loop thing in the frame where i put the sound it doesnt work.
I want the sound to continue looping throught the whole movie, not just at the end frame, how do i do this for a short sound?
there is no tutorial on how to do this anywhere on kirupa, so i cant figure it out.
is there a symbol for infinit that i can put into the (0,99) thing to replace 99 with infinit?
Originally posted by Troll_axethrowe I got a sound to work in my actionscript for a flash movie. But when i put the loop in that frame it doesnt work, where do i want to put the onSoundComplete loop in the flash?
attach sound from library.
// sound object
mySound = new Sound();
// attach sound from library
mySound.attachSound("mySound");
// start sound
mySound.start();
// onSoundComplete start again
mySound.onSoundComplete = function() {
this.start();
}
Javascript is a bit more picky with it the semi-colons than Actionscript is, and PHP is strict as the d**ickens with it. In AS you don’t need them, but its good coding practice as kax said.