# Play the animation after the audio is completed

**URL:** <https://forum.kirupa.com/t/play-the-animation-after-the-audio-is-completed/28201>\
**Category:** flash\
**Created:** [August 11, 2003, 7:34am UTC](https://forum.kirupa.com/t/play-the-animation-after-the-audio-is-completed/28201 "2003-08-11T07:34:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![apple](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@apple](https://forum.kirupa.com/u/apple)\
**Post date:** [August 11, 2003, 7:34am UTC](https://forum.kirupa.com/t/play-the-animation-after-the-audio-is-completed/28201/1 "2003-08-11T07:34:19Z")

</div>

what should i do to make the animation plays after the audio is finished. I’m using the attach sound to play audio. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 11, 2003, 7:39am UTC](https://forum.kirupa.com/t/play-the-animation-after-the-audio-is-completed/28201/2 "2003-08-11T07:39:43Z")

</div>

Use the onSoundComplete handler… 😛

[http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary664.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary664.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 11, 2003, 8:00am UTC](https://forum.kirupa.com/t/play-the-animation-after-the-audio-is-completed/28201/3 "2003-08-11T08:00:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 11, 2003, 8:19am UTC](https://forum.kirupa.com/t/play-the-animation-after-the-audio-is-completed/28201/4 "2003-08-11T08:19:30Z")

</div>

[AS]mySound.onSoundComplete = function() {  
**play();**  
};[/AS]  
??
