private var st:SoundTransform = new SoundTransform(0);
private const max:int = int.MAX_VALUE;
private var context:SoundLoaderContext = new SoundLoaderContext(2000, true);
private var bkdSound:URLRequest = new URLRequest("background.mp3");
private var bkdS:Sound = new Sound();
private var pausePoint:Number = 0.00;
private var paused:Boolean = false;
function init():void{
bkdS.load(bkdSound, context);
//START PLAYING THE SOUND
bkdChannel = bkdS.play(0, max, st);
}
function pauseSound():void{
if(!paused){
//THIS PART IS THE KEY YOU NEED TO % INTO THE LENGTH OF THE SOUND
pausePoint = bkdChannel.position % bkdS.length;
bkdChannel.stop();
paused = true;
}else{
//USE THIS TO RESUME//
bkdChannel = bkdS.play(pausePoint, max, st );
paused = false;
}
}