在 actionscript 3 中嵌入 mp3 不起作用 [英] Embed mp3 in actionscript 3 doesn't work

查看:20
本文介绍了在 actionscript 3 中嵌入 mp3 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 actionscript 3 时遇到问题,尤其是在使用 embed 标签时.我有这个代码:

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

<代码>[嵌入(source = "sound.mp3")]
私有静态 var soundClip:Class;

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

...

var sound:Sound = (new soundClip()) as Sound;
跟踪(声音.长度);

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?

谢谢.

推荐答案

Embed 过程意味着转码(由编译器进行),如果声音不适合支持的 Flash Player 声音格式,您可能会得到意想不到的结果,像缩水一样.检查您嵌入的声音是否为 44100 Hz 立体声,这是支持的采样率,不会导致任何问题.

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.

干杯!

这篇关于在 actionscript 3 中嵌入 mp3 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆