<mx:VBoxxmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" creationComplete="loadSound()"> <mx:Script> <![CDATA[ privatevar sound:Sound; privatevar chan:SoundChannel; privatefunction loadSound():void { sound = new Sound( new URLRequest("http://localhost:3001/Plans.mp3")); chan = sound.play(); } privatefunction scanPosition():void { chan.stop(); //divide by 10 because the Slider values go from 0 - 10 and we want a value between 0 - 1.0 chan = sound.play(positionSlider.value/10 * sound.length); } privatefunction scanVolume():void { var trans:SoundTransform = new SoundTransform(volumeSlider.value, (panSlider.value - 5)/10); chan.soundTransform = trans; }