# Stop Audio Streaming

**URL:** https://forum.kirupa.com/t/stop-audio-streaming/267513
**Category:** flash
**Created:** [August 2, 2008, 2:02am UTC](https://forum.kirupa.com/t/stop-audio-streaming/267513 "2008-08-02T02:02:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ThaJock](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@ThaJock](https://forum.kirupa.com/u/ThaJock)
#### Post date: [August 2, 2008, 2:02am UTC](https://forum.kirupa.com/t/stop-audio-streaming/267513/1 "2008-08-02T02:02:02Z")

</div>

I have a stop and play button that is used for streaming an mp3. I **can** stop the audio with stopAllSounds(); but it keeps downloading. This causes glitches and delays each time the other play buttons are clicked on because it’s still downloading.

Heres the code:

**Frame** 1  
btn\_play.onRelease = function (){  
gotoAndStop(2);  
}

**Frame 2**  
stop();  
var track1:Sound = new Sound();  
track1.loadSound(‘[http://www.site.com/song.mp3](http://www.site.com/song.mp3)’, true);  
btn\_stop.onRelease = function (){  
stopAllSounds();  
gotoAndStop(1);  
}

The reason I chose to stream the audio is to keep my swf file size as small as possible so importing the audio into library isn’t a good option.

Is there any way to stop the audio from streaming after it has been invoked?  
If not, I read somewhere where you can do something similar with uh…I think loadMovie and/or unload Movie (mp3 saved as swf?). Can anyone explain this method or point me in the right direction.

Any help would be greatly appreciated.
