Search code examples
flashactionscriptmp3

Mp3 Player progress bar


I have an mp3 progress bar with my mp3 player.When the song is loading/playing the progress bar jumps around until the song has completely downloaded/loaded.

Is this the normal functionality.

I am using the following on an EnterFrame Event.

duration = this.duration;
   pos = this.position;
   //The songs postion
   songPosition = (pos/duration)*100;
   updateProgress(songPosition);//Updates the progress Bar

Solution

  • Position and duration may not be known until the song gets loaded right. So I will initiate the progress bar after loading. (onLoad listerner)