Load multiple external swf in AS3

In this post I will write about loading multiple external swf’s in Actionscript 3. A common problem you face when loading more than one swf is that multiple copies can potentially be loaded. Look at the example below. btn1.addEventListener(MouseEvent.CLICK, loadSwf1); btn2.addEventListener(MouseEvent.CLICK, loadSwf2); function loadSwf1(e:MouseEvent):void{ var loader1:Loader = new Loader(); loader1.load(new URLRequest("exampleA.swf")); addChild(loader1); } function

Read more ...