简体   繁体   English

Flash CS5的连续音频(Actionscript 2.0)

[英]Continuous audio for Flash CS5 (Actionscript 2.0)

I made a menu which has multiple SWF files. 我做了一个包含多个SWF文件的菜单。 In the first movie, the audio is playing but in the second SWF, my audio is not playing. 在第一部电影中,正在播放音频,但是在第二部SWF中,我的音频没有播放。

Is there any way to use only one audio for multiple SWF files without putting the audio on every each one of them? 有什么方法可以只将一个音频用于多个SWF文件,而不必在每个音频文件上都放置音频?

There is a possibility of doing that if the sound and the other swf files are in the same directory and load THAT audio to the swf. 如果声音和其他SWF文件位于同一目录中,并且将音频加载到SWF,则有可能这样做。

var s:Sound = new Sound();

s.onLoad = function():Void
{
    trace("Song loaded.");
};

s.onSoundComplete = function():Void
{
    trace("Song done.");
};

s.loadSound("music.mp3", true);

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

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