在ActionScript 3嵌入MP3无法正常工作无法正常、工作、ActionScript

2023-09-09 21:38:22 作者:岁月如歌@

我有ActionScript 3的一个问题,使用嵌入标签时尤其如此。我有这个code:

I have a problem with actionscript 3, especially when using the embed tag. I have this code:

[嵌入(来源=sound.mp3) 私人静止无功soundClip:类;

[Embed(source = "sound.mp3")] private static var soundClip:Class;

...

VAR的声音:声音=(新soundClip())的声音; 跟踪(sound.length);

var sound:Sound = (new soundClip()) as Sound; trace(sound.length);

当我测试的电影,我得到以下的输出:4501,923哪个是sound.mp3长度,单位为毫秒。然而,原来声音是13.000毫秒。

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?

感谢你。

推荐答案

的嵌入过程意味着transcodification(由编译器),如果声音不适合支持Flash Player中的声音文件格式,你可以得到意想不到的效果,像缩水的长度。 请检查您嵌入的声音是44100赫兹立体声,那就是支持采样率不会造成任何问题。

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.

干杯!