Posted By

russdogg on 06/18/11


Tagged

load swf as3


Versions (?)

Load External SWF


 / Published in: ActionScript 3
 

  1. import flash.events.Event;
  2. import flash.display.Loader;
  3. import flash.net.URLRequest;
  4.  
  5. var swfLoader:Loader = new Loader();
  6.  
  7. holderMC.addChild(swfLoader);
  8.  
  9. var bgURL:URLRequest = new URLRequest("loadSWF_File.swf");
  10.  
  11. swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete);
  12.  
  13. swfLoader.load(bgURL);
  14.  
  15. function loadProdComplete(e:Event):void
  16. {
  17.  
  18. trace(“file loaded);
  19.  
  20. }

Report this snippet  

You need to login to post a comment.