as3中按钮点击加载的SWF相关问题,求助?急急 15
stop();varMovie_Ldr:Loader=newLoader();play1_btn.addEventListener(MouseEvent.CLICK,lo...
stop();
var Movie_Ldr:Loader=new Loader();
play1_btn.addEventListener(MouseEvent.CLICK,loadHandler);
function loadHandler(event:Event):void
{
Movie_Ldr.unloadAndStop();
var URLstr:String = "zwmr.swf";
var req:URLRequest = new URLRequest(URLstr);
Movie_Ldr.load(req);
Movie_Ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,onCOMPLETE);
}
function onCOMPLETE(evt:Event):void
{
if (SwfMc.numChildren > 0)
{
SwfMc.removeChildAt(0);
}
SwfMc.addChild(Movie_Ldr);
//下面还可以对它的其他属性进行调整,如下;
SwfMc.x = -600;
SwfMc.y = -205;
}
按点击钮加载进来的“zwmr.swf”,想要用removeChild,去掉“zwmr.swf”进来时覆盖下的y01_mc, 我这段代码应该怎么添加或改动????
哪位高手帮帮忙
mrml.swf里按钮点击加载进来的“zwmr.swf”,想要用removeChild,去掉“zwmr.swf”进来时覆盖下的mrml.swf的y01_mc, 我这段代码应该怎么添加或改动???? 展开
var Movie_Ldr:Loader=new Loader();
play1_btn.addEventListener(MouseEvent.CLICK,loadHandler);
function loadHandler(event:Event):void
{
Movie_Ldr.unloadAndStop();
var URLstr:String = "zwmr.swf";
var req:URLRequest = new URLRequest(URLstr);
Movie_Ldr.load(req);
Movie_Ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,onCOMPLETE);
}
function onCOMPLETE(evt:Event):void
{
if (SwfMc.numChildren > 0)
{
SwfMc.removeChildAt(0);
}
SwfMc.addChild(Movie_Ldr);
//下面还可以对它的其他属性进行调整,如下;
SwfMc.x = -600;
SwfMc.y = -205;
}
按点击钮加载进来的“zwmr.swf”,想要用removeChild,去掉“zwmr.swf”进来时覆盖下的y01_mc, 我这段代码应该怎么添加或改动????
哪位高手帮帮忙
mrml.swf里按钮点击加载进来的“zwmr.swf”,想要用removeChild,去掉“zwmr.swf”进来时覆盖下的mrml.swf的y01_mc, 我这段代码应该怎么添加或改动???? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询