全部博文(556)
分类: 系统运维
2011-06-30 20:31:48
1.首先导入包
import flash.media.Sound;
2.在Script中写代码(最好写在初始化程序中initApp())
var req:URLRequest = new URLRequest("music.mp3");
var sound:Sound = new Sound(req);
sound.play();
3.把initApp()函数放在creationComplete中
creationComplete="initApp();"
OK,搞定!