Since mySound.duration reflects *loaded* duration - there is no way to
get the actual duration of a loaded mp3 through the Sound class.
A work around and what I've been doing: Divide mySound.getBytesLoaded
by mySound.getBytesTotal to get a percentage of the song that is
currently loaded; and then take mySound.duration and divide that by
the percentage loaded. Provided that the duration property of mySound
is accurately representing the amount of ms loaded, I should arrive at
an accurate result.
Unfortunately, both properties do not synchronize 100%, and the
duration value progressively gains accuracy as the mp3 loads, opposed
to getting a correct duration immediately.
I would really like to find a more accurate way. Ideally I would like
to get the complete duration of a loaded mp3 through flash immediately
upon stream so the end-user doesn't see the progress bar jutting
backwards and the total duration value slowly increasing as the song
loads--without depending on external scripts or an xml playlist
file...etc.
Any help / insight appreciated,
Joseph Sorensen
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com