Guest User

Untitled

a guest
Nov 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function loadIcons():void
  2. {
  3. var i:int = 0;
  4.  
  5. for each (var xml:XML in Assets.ITEMSINDEX[i])
  6. {
  7. if (xml.@holdable == 1)
  8. {
  9. var ldr:Loader = new Loader();
  10. var url:String = xml.@icon
  11. var urlReq:URLRequest = new URLRequest(Main.masterURL + url);
  12. ldr.load(urlReq);
  13. ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, iconLoaded)
  14. function iconLoaded(e:Event):void { Assets.iconsLoaded.push(new Image(Bitmap(ldr.content).bitmapData)); Assets.iconURLs.push(url); }
  15. }
  16. i++;
  17. }
  18. loadInteractions();
  19. }
Add Comment
Please, Sign In to add comment