How to load and unload Multiple External SWF


hello there,

 

i need figuring out how load , unload(removing) multiple external swf.

 

so here i;m trying do,

i want load multiple external swf , play on main swf hove no problem loading multiple swf , placing in display list .the problem came when tried removing loaded swf display list ,the problem exist because have no way refer have loaded , placed on display list,

 

i used single loader instance load external swf,

i know have remove event listener related external swf want remove , purpose have crated function called destroy main objective function remove event listener inside swf , isolating variable eligible garbage collecting, here code like:

// create in every object use
public function destroy():void
{
     // remove event listeners
     // remove in display list
     // clear references other objects, gets totally isolated

}

sorry kind of pseudocode cause function customize it's own property did purpose of simplicity , easy understanding..,

 

so main problem how should solve problem??

i tried used arraf save loaded swf

(

     array used save loader loading adding display method using

 

movieclipactascontainer.addchild(e.target.content); //the event event.complete

)

but have hard time using arrya , matching 1 got display list.

 

please me,

any suggestion appreciated,

and if can pleas show me source code or pseudocode of you're suggesting me cause english not fluent yet,

thanks before.

hey ei,

 

i had done kind of project , loading , unloading different swfs. had used loaders specific filename , removing had used single movieclip instance name , on clicking specific loader request name needs removed requested specific function. mentioned below

 

loading swf:

===============================

swfloaderindia.load(swfrequestindia);//this load request

 

if inside movieclip while requesting use below code

------------------------------------------------------------------------------------------ --

movieclip(this.root).addchild(swfloaderindia);//this load swf on stage

 

or else

stage.addchild(swfloaderindia);

 

 

unloading swf

=====================================

if inside movieclip while requesting use below code

------------------------------------------------------------------------------------------ --

movieclip(this.root).removechild(swfloaderindia);//this unload swf on stage

or else

stage.removechild(swfloaderindia);

 

above code in specific function requested when loading , unloading required.

 

i hope helps in project.

 

with regards,

sagar s. ranpise



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい