# Cache Problem with Streaming Mp3 ::.. Help Appreciated

**URL:** https://forum.kirupa.com/t/cache-problem-with-streaming-mp3-help-appreciated/217406
**Category:** flash
**Created:** [February 26, 2007, 6:53pm UTC](https://forum.kirupa.com/t/cache-problem-with-streaming-mp3-help-appreciated/217406 "2007-02-26T18:53:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chuckfarley](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@chuckfarley](https://forum.kirupa.com/u/chuckfarley)
#### Post date: [February 26, 2007, 6:53pm UTC](https://forum.kirupa.com/t/cache-problem-with-streaming-mp3-help-appreciated/217406/1 "2007-02-26T18:53:13Z")

</div>

I am using the following code to Pause, Fade-in & Play a streaming Mp3 from an external site:

```auto
 var vol:Number = 0;
var s:Sound = new Sound();
s.loadSound("[COLOR=Black]http://[/COLOR][COLOR=Black]mysite.com:8000[/COLOR]", true );
s.setVolume(vol);

this.createEmptyMovieClip("fader", 1);

function fadeIn(){
    fader.onEnterFrame = function(){
        vol++;
         s.setVolume(vol);
        if (vol >= 100){
            vol = 100;
            delete this.onEnterFrame;
        }
    }
}

setTimeout(fadeIn, 5000);

```

The problem is that this file is never-ending and ultimately slows the computer WAY down. I’m assuming this has to do with the cache filling up with the never-ending Mp3 file.

Does anyone know a way to periodically dump the Cache or… limit the amount of the file loaded into the Cache? Say 3-5 Seconds

I am assuming a “DO NOT CACHE” code won’t work as the Mp3 is streaming and requires a certain amount for uninterrupted play.

Please & Thank You
