简体   繁体   English

预载声音AS3

[英]Preload sound AS3

I have AS3 project, made with FlashBuilder. 我有用FlashBuilder制作的AS3项目。 I'm using MovieClips from an external .SWC-file. 我正在使用来自外部.SWC文件的MovieClips。 In a MovieClip from the .SWF-file, I want to use an audio-file. 在来自.SWF文件的MovieClip中,我要使用音频文件。

Is it possible to preload a sound-file (eg .MP3) in my FlashBuilder project, and access it in a MovieClip inside the .SWC? 是否可以在FlashBuilder项目中预加载声音文件(例如.MP3),然后在.SWC内的MovieClip中访问它?

Thanks a lot! 非常感谢!

Yes, I don't know hoe you create your swc's but I'll tell you my setup which always works. 是的,我不知道您创建自己的swc,但是我会告诉您我的设置始终有效。

I create an asset FLA which would have the mp3 among other things. 我创建了素材资源FLA,其中包含mp3。 I compile using FlashDevelop, and use the preloader template. 我使用FlashDevelop进行编译,并使用预加载器模板。 Never had problems with that. 从来没有问题。

What you can't do is use SWCs run-time. 您不能做的是使用SWC运行时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM