all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

getURL after sounds have completes


getURL after sounds have completes UnclePuppy
1/1/2005 9:01:01 PM
flash actionscript:
Hi, I'm kind of stumped. I have a series of six buttons that all play a
different sound on mouseDown. Each sound is different in length but not more
than 1.5 to 1.8 seconds or so. My problem is, I need the sound to finish
playing before the getURL action takes place. Anyone know how/if this can be
done? Thanks! DC
Re: getURL after sounds have completes abeall
1/1/2005 9:09:34 PM
How are you playing the sounds? If you use the Sound object, it's very easy.
You simply use the onSoundComplete function. Otherwise, you might want to try
a setInterval, because then you can execute the getURL function after a delay.
Re: getURL after sounds have completes UnclePuppy
1/1/2005 9:20:52 PM
Hi, Thanks. I was not (am not) aware of the onSoundComplete function (due to
my skill level). I'm sure I can find more about this on this forum but if you
can provide an example I would really appreciate it. To answer your question,
I'm playing the sounds as usual, on a separate layer in the over and down
states. Thanks! DC
Re: getURL after sounds have completes abeall
1/1/2005 9:24:40 PM
I'm away, without Flash, and I can't remember the exact syntax, but I can tell
you that there is plenty of information about it in the F1 reference. Just look
up the Sound (object) and your set. From memory(not to be trusted): mySound =
new Sound(); mySound.attachSound('whatever');//MP3 in library with linkage
identifier mySound.onSoundComplete = function(){ getURL() } HTH
Re: getURL after sounds have completes UnclePuppy
1/1/2005 9:27:23 PM
Thanks,
Yeah, I hit F1 and ultimately I ended up going to Macromedia website.
Thanks again.
Re: getURL after sounds have completes abeall
1/2/2005 12:31:08 AM
Took me some time to use the F1 effectivelty too :-)

Look at the ActionScript Dictionary, click on S, and click one Sounc (object) - it will list out everything you can do with it quite nicely.

AddThis Social Bookmark Button