# Just want to stop and start a sound!

**URL:** <https://forum.kirupa.com/t/just-want-to-stop-and-start-a-sound/292016>\
**Category:** flash\
**Created:** [July 9, 2009, 2:27am UTC](https://forum.kirupa.com/t/just-want-to-stop-and-start-a-sound/292016 "2009-07-09T02:27:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tibberous](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tibberous](https://forum.kirupa.com/u/tibberous)\
**Post date:** [July 9, 2009, 2:27am UTC](https://forum.kirupa.com/t/just-want-to-stop-and-start-a-sound/292016/1 "2009-07-09T02:27:38Z")

</div>

```php

import flash.external.ExternalInterface;

snd = new Sound();
snd.load(new URLRequest('music.mp3'));
snd.addEventListener("complete", function(evt:Event){ chnl = snd.play(0,stage.loaderInfo.parameters.noloop?0:1000); });

ExternalInterface.addCallback("on", on);
function on(str):void {
    snd.play();
}

ExternalInterface.addCallback("off", off);
function off(str):void {
    chnl.stop();
}

```

So, it runs, loads the mp3, and plays on complete. I call the off function, and it works.

I call the on function, and it works.

Call the off function again, and it doesn’t work!

I have tried snd.play(); and chnl = snd.play(); in the on function, neither work. Any ideas?
