Progress bar with xml audio player

I am trying to create a XML based music player with a progress bar which shows the duration of the currently playing audio, the music player works fine, and although I got a version working in AS2 I cannot get the AS3 version right. I have a loop event in my play function which should be checking the duration played etc and altering the scaleX property of progressBar but something aint working at the mo, I am at a loss!

any help appreciated, my progress bar is called “progressBar”

here is my code::

var jukeboxX:XML;
var songList:XMLList;
var currentIndex:Number = 0;
var currentSound:Sound;
progressBar.scaleX = 0;

var firstSong:Sound = new Sound();
var sc:SoundChannel;
currentSound = firstSong;

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete);
loader.load(new URLRequest(“songs.xml”));

function onComplete(e:Event):void
{
jukeboxX = new XML(loader.data);
songList = jukeboxX.song;
//trace(songList);

firstSong.load(new URLRequest(songList[currentIndex].url));
sc = firstSong.play();
title_txt.text = songList[currentIndex].author;
quote_txt.text = songList[currentIndex].title;

stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
play_btn.addEventListener(MouseEvent.CLICK, playSound);
next_btn.addEventListener(MouseEvent.CLICK, nextSound);
prev_btn.addEventListener(MouseEvent.CLICK, prevSound);

}
function stopSound(e:Event):void
{
sc.stop();
play_btn.addEventListener(MouseEvent.CLICK, playSound);

}
function playSound(e:Event):void
{
function loop(event:Event):void
{
var currentPosition:Number = sc.position / currentSound.length ;
progressBar.scaleX = currentPosition;
}
sc.stop();
sc = currentSound.play();
play_btn.removeEventListener(MouseEvent.CLICK, playSound);

}
function nextSound(e:Event):void
{
var nextSound:Sound = new Sound();
sc.stop();
currentSound = nextSound;
if (currentIndex < songList.length() - 1)
{
currentIndex++;
}
else
{
currentIndex = 0;
}
nextSound.load(new URLRequest(songList[currentIndex].url));
sc = nextSound.play();
title_txt.text = songList[currentIndex].author;
quote_txt.text = songList[currentIndex].title;

}
function prevSound(e:Event):void
{
var prevSound:Sound = new Sound();
sc.stop();
currentSound = prevSound;
if (currentIndex > 0)
{
currentIndex–;
}
else
{
currentIndex = songList.length() - 1;
}
prevSound.load(new URLRequest(songList[currentIndex].url));
sc = prevSound.play();
title_txt.text = songList[currentIndex].author;
quote_txt.text = songList[currentIndex].title;
}