AS3 加载声音

import flash.events.Event;
import flash.media.Sound;
import flash.net.URLRequest;
 
var s:Sound = new Sound();
s.addEventListener(Event.COMPLETE, onSoundLoaded);
var req:URLRequest = new URLRequest("bigSound.mp3");
s.load(req);
 
function onSoundLoaded(event:Event):void
{
    var localSound:Sound = event.target as Sound;
    localSound.play();
}
我的网站设计 web design home page
http://www.webdesign-china.cn
http://www.webdesign-china.cn

你可能感兴趣的:(.net,Web,Flash)