# Sound streaming progress bar Help ! plzz help

**URL:** <https://forum.kirupa.com/t/sound-streaming-progress-bar-help-plzz-help/318491>\
**Category:** Uncategorized\
**Created:** [January 21, 2011, 12:36pm UTC](https://forum.kirupa.com/t/sound-streaming-progress-bar-help-plzz-help/318491 "2011-01-21T12:36:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saadanjum](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@saadanjum](https://forum.kirupa.com/u/saadanjum)\
**Post date:** [January 21, 2011, 12:36pm UTC](https://forum.kirupa.com/t/sound-streaming-progress-bar-help-plzz-help/318491/1 "2011-01-21T12:36:40Z")

</div>

Hi, I’m new to Action Scripting, im using Flash CS4 and actionScript 3.0. I am trying to make a Song streaming player like the one on **[www.beemp3.com](http://www.beemp3.com)** and other such sites… I know how to get a song to stream… and i also get the percentage of how much the song has been loaded… but cant make a progress bar according to it… can u guys plzz help me out…

so far i have done this…

```auto
play1_btn.visible = false;

// importing classes ---->
import flash.media.Sound;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;

var req:URLRequest = new URLRequest("my.mp3");
var s:Sound = new Sound();
var context:SoundLoaderContext = new SoundLoaderContext(2000, true);

//Tracing progess----->
s.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
function onLoadProgress(event:ProgressEvent):void {
   var loadedPct:int = ((event.bytesLoaded / event.bytesTotal) * 100);
   trace(loadedPct + "% loaded");
}

//button scripting--->
play_btn.addEventListener(MouseEvent.CLICK, playF);

function playF(event:MouseEvent):void{
    s.load(req, context);
    s.play();
    play_btn.visible = false;
    play1_btn.visible = true;
}

stop_btn.addEventListener(MouseEvent.CLICK, stopF);

function stopF(event:MouseEvent):void{
    SoundMixer.stopAll();
}

play1_btn.addEventListener(MouseEvent.CLICK, play1F);

function play1F(event:MouseEvent):void{
    s.play();
}

```

What i want to do is use the progress percentage and visually show how much has been loaded via progress bar… plzz help !!!

and thnx in Advance…😃
