PDA

View Full Version : loop sounds



gheckman
October 10th, 2003, 12:48 PM
i have a soung loop that i want to "loop" in my movie.
this is my script:

mySound = new Sound();
mySound.loadSound("loops/music.mp3",true);

the problem is that it only plays once (5 seconds long) and then stops, how do i get it to loop? - short of placing it on the timeline.

Voetsjoeba
October 10th, 2003, 02:01 PM
Have a look at www.kennybellew.com :)

Digitalosophy
October 10th, 2003, 02:25 PM
you cannot loop a streaming sound like you would when attaching it.

search!!! this quesiton has been asked 200,000,000 times

:)

Voetsjoeba
October 10th, 2003, 02:42 PM
Yes you can :sigh:



mySound.onSoundComplete = function(){
this.start();
}

Digitalosophy
October 10th, 2003, 02:51 PM
Originally posted by Voetsjoeba
Yes you can :sigh:



mySound.onSoundComplete = function(){
this.start();
}



but that's not how you would loop it when attaching it there buddy


mySound.start(0,999);


that will not work when streaming. you have to use the code you gave which is why i told him to search, to find that code:-\

Voetsjoeba
October 10th, 2003, 03:15 PM
You can't use start(offset,loops) for a streaming sound indeed. But that doesn't mean you can't loop it ...

Digitalosophy
October 10th, 2003, 06:49 PM
o no definalty not, i agree 100%. a lot of times i see posts wondering why that syntax won't work though.

i def did not mean u couldn't do it.

Voetsjoeba
October 11th, 2003, 03:28 AM
I know. I'm not angry with you :)

I think it's all about the offset in start(offset,loops). To have a sound play at a certain position, it must be fully loaded. Because the sound is streaming, it isn't fully loaded.

Digitalosophy
October 11th, 2003, 04:12 AM
please forgive me if i sounded a bit testy, didnt mean anything by it.

your probably right when u say this;


think it's all about the offset in start(offset,loops). To have a sound play at a certain position, it must be fully loaded. Because the sound is streaming, it isn't fully loaded


i've been pondering for a while on this subject.

kenny bellew doesnt really say "why" you cant loop streaming sounds like that, but thats the best explanation i've heard so far :)

good night all
:):):):):):):