
flash cs4 用按钮加载swf文件
有三个swf格式的文件,分别为A.swf;B.swf和C.swf,播放时能用按钮互相跳转,不知道AS3.0中脚本如何设置?...
有三个swf格式的文件,分别为A.swf;B.swf和C.swf,播放时能用按钮互相跳转,不知道AS3.0中脚本如何设置?
展开
1个回答
展开全部
var contentLoader:Loader;
btn_load.addEventListener(MouseEvent.CLICK,function(e:MouseEvent){loadContent(enter url here)});
function loadContent(url:String):void {
contentLoader = new Loader();
contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
contentLoader.load(new URLRequest(url));
}
function contentLoaded(evt:Event):void {
addChild(contentLoader);
}
btn_load.addEventListener(MouseEvent.CLICK,function(e:MouseEvent){loadContent(enter url here)});
function loadContent(url:String):void {
contentLoader = new Loader();
contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
contentLoader.load(new URLRequest(url));
}
function contentLoaded(evt:Event):void {
addChild(contentLoader);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询