views:

11

answers:

1

Hi All! I use Sound object http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/media/Sound.html from my player. It method play get first param startTime in milliseconds. How i can get position in bytes by the time.

A: 
var song:SoundChannel=new SoundChannel();
            var mp3:Sound=new Sound(new URLRequest("http://localhost/file.mp3"));
            var positionInBytes:int=0;


            song=mp3.play();
            positionInBytes=song.position/mp3.length*mp3.bytesTotal;
Eugene