# Stop sound with ActionScript

**URL:** <https://forum.kirupa.com/t/stop-sound-with-actionscript/286218>\
**Category:** flash\
**Created:** [April 12, 2009, 2:34am UTC](https://forum.kirupa.com/t/stop-sound-with-actionscript/286218 "2009-04-12T02:34:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anataya](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Anataya](https://forum.kirupa.com/u/Anataya)\
**Post date:** [April 12, 2009, 2:34am UTC](https://forum.kirupa.com/t/stop-sound-with-actionscript/286218/1 "2009-04-12T02:34:34Z")

</div>

I’ve got a movie where there’s an audio file looping throughout it (across many different scenes) and in the final scene I need it to stop playing at a particular frame. I’ve tried a few different things with ActionScript (2) but haven’t gotten anywhere. I googled what I wanted to do but most of the results involved buttons - I want this sound to stop when I get to a particular frame, and allow the other sounds to continue playing. I figure it’s only a few lines of AS but I don’t know what’s right. Currently I have this:

onClipEvent (enterFrame) {  
busInterior.stop(); }

Which doesn’t make the compiler happy (Clip events are permitted only for movie clip instances). I have the audio file in a movie clip at the moment 'cause I read somwhere that that made things easier, and I wasn’t sure that it would work if I just put the name of the MP3 file in anyway.
