Groups | Blog | Home
all groups > macromedia players flash > december 2006 >

macromedia players flash : BUG Sound.length bug when loading a 11.025hz MP3 file!


Pi 3.1
12/6/2006 6:37:27 PM
When loading a 11.025hz MP3 file using the Sound object of AS3, the value of
the 'Sound.length' property isn't correct... ONLY while the sound is loading.
When the Sound is fully loaded, the 'Sound.length' property is gives the
correct value.
I do not mean that the Sound.length is smaller when the Sound is still
loading... because this is normal behaviour.
The Sound.length becomes way BIGGER then when the file is completely loaded!!!

So far, i only got this behaviour with 11.025hz MP3 files.
22.055hz MP3 files are working correctly.

Here's a link to a example 11.025hz MP3 file that isn't working:
http://www.e-phonic.com/test_11khz.zip

Pseudo-code to load it and trace the error:

[Start Action Script 3 Pseudo-code]

MySound = new Sound();
MySound.load("test_11khz.mp3");
MySoundChannel = MySound.play();
MySound.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
MySound.addEventListener(Event.COMPLETE, onCompleteHandler);

function onProgressHandler() {
trace("While loading the lenght is: "+MySoundChannel.length);
}

function onCompleteHandler() {
trace("When finished Loading the lenght is: "+MySoundChannel.length);
}

[End Action Script 3 Pseudo-code]

Please contact me at info::at::e-phonic.com if you have any questions about
this issue.
Pi 3.1
12/7/2006 12:00:00 AM
I also have had several crashes while testing this.

As the sound is loading ... and the Sound.length value is giving the wrong
value (mostly way larger then the sound actually is) ... setting the
Sound.position causes a crash sometimes!


Pi 3.1
1/16/2007 8:17:20 AM
AddThis Social Bookmark Button