i have made an mp3 player that loads mp3s from a dir on my server and streams them. i made a duration bar (duration_mc) to show how much of the song has elaped:


duration_mc.onEnterFrame = function(duration){
this._xscale=my_sound.position/my_sound.duration*100;


it works for the first song, but then when you click another track it will continue from where it left off on the previous song.

my question is, how can i make the duration bar reset to the beginning when you click to stream another song?