PDA

View Full Version : Play the animation after the audio is completed



apple
August 11th, 2003, 03:34 AM
what should i do to make the animation plays after the audio is finished. I'm using the attach sound to play audio. Thanks.

kode
August 11th, 2003, 03:39 AM
Use the onSoundComplete handler... :P

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary664.html

apple
August 11th, 2003, 04:00 AM
thanks. I did use the onSoundComplete handler, but....it not working as i wanted to be. Below is my code:

ACTION SCRIPT

stop();
isSoundCompleted=0;
mysound = new Sound(this);
mysound.attachSound("Dialog1");
mysound.start();
mysound.onSoundComplete=function() {
isSoundCompleted=1;
mysound.stop();
delete mysound;
}

After the dialog 1 completed, it should be an animation start to play. But, it doesn't. I think it is b'coz i used the stop () function. But, if i didn't use this, all the animation will play together. So, i hope you understand what i trying to say here and maybe you could help me out by giving me another solution. Thanks.

kode
August 11th, 2003, 04:19 AM
mySound.onSoundComplete = function() {
play();
};
??