flash - AS3: Loading SWFs in a for loop -
I am trying to load the external SWF for the loop, and I have a problem that is actually eating me Is: Event handler I need to know the loaded SWF file name, but I can not get it. The code below shows what I am trying to do.
Anyone have any ideas?
function loadManySWFs (arrayOfFileNames: Array) {for (var i = 0; i & lt; arrayOfFileNames; i ++) {var mLoader: loader = new loader (); Var mRequest: URLRequest = new URLRequest (arrayOfFileNames [i])); MLoader.contentLoaderInfo.addEventListener (EventComplete, OnloadComplete); MLoader.load (mRequest); }} Function onLoadComplete (e: Event) {// Here I have to know the file name of SDF which was loaded. how can I do this? }
Thanks for any help!
Comments
Post a Comment