# as3 : replay streaming sound after it finishes

**URL:** https://forum.kirupa.com/t/as3-replay-streaming-sound-after-it-finishes/306035
**Category:** flash
**Created:** [March 8, 2010, 5:10pm UTC](https://forum.kirupa.com/t/as3-replay-streaming-sound-after-it-finishes/306035 "2010-03-08T17:10:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flashman2006](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@flashman2006](https://forum.kirupa.com/u/flashman2006)
#### Post date: [March 8, 2010, 5:10pm UTC](https://forum.kirupa.com/t/as3-replay-streaming-sound-after-it-finishes/306035/1 "2010-03-08T17:10:30Z")

</div>

hi there i am using this code to stream sound

```php
import flash.media.SoundMixer;
import flash.net.URLRequest;
import flash.media.Sound;
import flash.media.SoundLoaderContext;

removeChild(lpc);

stop();

var soundOne:URLRequest = new URLRequest("sound.mp3");

var context:SoundLoaderContext = new SoundLoaderContext(8000);

var songOne:Sound = new Sound();

var volumeControl:SoundTransform=new SoundTransform();
var soundControl:SoundChannel = new SoundChannel();

songOne.load(soundOne, context);

songOne.addEventListener(Event.COMPLETE, onComplete2);

function onComplete2(event:Event):void
{
vividS.addEventListener(MouseEvent.CLICK, playOne);
vividP.addEventListener(MouseEvent.CLICK, stopOne);
trace('song one loaded');
}

function playOne(event:MouseEvent):void
{
	SoundMixer.stopAll();
soundControl.stop();
vividS.visible = false;
vividP.visible = true;
}

function stopOne(event:MouseEvent): void
{
SoundMixer.stopAll();
soundControl = songOne.play();
soundControl.soundTransform=volumeControl;
vividP.visible = false;
vividS.visible = true;
}

songOne.play();
vividP.visible = false ;

```

i want to know how to replay sound after it finished but without streaming it again
