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
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.
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
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
Thanks, Yeah, I hit F1 and ultimately I ended up going to Macromedia website. Thanks again.
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.
Don't see what you're looking for? Try a search.
|