all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

Using onSoundComplete


Using onSoundComplete jansson_17
6/12/2004 6:48:48 PM
flash actionscript:
If anyone can tell me what I'm doing wrong I would be grateful for you help.

I'm trying to use the onSoundComplete stament to redirect the page to a
certain URL. Here's how I am using to do this

mysound.onSoundComplete = getURL ("http://www.webite.com", "_self");

The problem is once the page loads it goes straight to the URL instead of
waiting for the audio to finish playing. The desired result is for animation to
play, aduio finish it's sequence and go right to the appropriate URL. I've
tried this statment on the first and last frame of the layer but still the same
results.

Would I have to add a (function) statment as well? ANy help is appreciated

Re: Using onSoundComplete CSEd2
6/12/2004 7:00:46 PM
The actionscript below causes the transfer to frame "end" when the sound is
finished.

var myAudio:Object = new Sound();
myAudio.loadSound("Audios/a8_1_7.mp3", false);
myAudio.onSoundComplete = function(){
gotoAndStop("end");
}
AddThis Social Bookmark Button