About sound duration

Hi I’m newby here and I want some help.

I just building a MP3 Player and load the external MP3 file into flash and I load it as a stream. I want to get the duration of the song for update my progress bar and now I using “sound.duration” to get that but this value will change when the whole file is not loaded (I mean if it loaded 1 sec. it return 1sec so that is not the actualy song duration)

Is there any method to get the file duration at the begining of sound loaded.

thank you and sorry for my English