james
james

Reputation: 2663

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

Upvotes: 0

Views: 1067

Answers (1)

billygoat
billygoat

Reputation: 21984

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

Upvotes: 1

Related Questions