I have a problem with actionscript 3, especially when using the embed tag. I have this code:
[Embed(source = "sound.mp3")]
private static var soundClip:Class;
...
var sound:Sound = (new soundClip()) as Sound;
trace(sound.length);
When I test the movie, I get the following output : 4501,923 Which is the sound.mp3 length in milliseconds. However, the original sound is 13.000 milliseconds.
How can that be possible, can anyone help me please?
Thank you.
The Embed process implies a transcodification (made by the compiler), if the sound doesn't fit into the supported Flash Player Sound format you can get unexpected results, like shrunk length. Check that the sounds you embed is at 44100 Hz Stereo, that is the supported sampling rate that won't cause any issues.
Cheers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With