Advertisement
Guest User

Untitled

a guest
Nov 14th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #initclip 72
  2. var banner = dofus.graphics.gapi.ui.Banner.prototype;
  3.  
  4. banner.createChildrenOrigin = _loc1.createChildren;
  5.  
  6. banner.createChildren = function()
  7. {
  8.     this.createChildrenOrigin();
  9.  
  10.     var modulesXML = new XML();
  11.     modulesXML.ignoreWhite = true;
  12.     var loader = this;
  13.  
  14.     modulesXML.onLoad = function(bSuccess)
  15.     {
  16.         loader.onModulesListLoaded(bSuccess,this);
  17.     };
  18.  
  19.     modulesXML.load("modules/list.xml");
  20. };
  21.  
  22. banner.onModulesListLoaded = function(bSuccess, xDoc)
  23. {
  24.     this.api.kernel.showMessage(undefined,"PARSE_XML","ERROR_CHAT");
  25.     if (success)
  26.     {
  27.         var fChild = xDoc.firstChild.firstChild;
  28.         if (fChild.childNodes.length == 0 || fChild == null)
  29.         {
  30.             this.criticalError("CORRUPT_CONFIG_FILE",this.TABULATION,false);
  31.             return;
  32.         }
  33.  
  34.         var modules = new ank.utils.ExtendedArray();
  35.  
  36.         while (fChild != null)
  37.         {
  38.             if (fChild.nodeName != undefined && fChild.nodeName.length > 0 && fChild.nodeName == "module")
  39.             {
  40.                 var moduleName = fChild.attributes.name;
  41.                 var moduleId = fChild.attributes.id;
  42.                 var modulePath = fChild.attributes.path;
  43.                 modules.push({id:moduleId, name:moduleName, path:modulePath});
  44.                 createEmptyMovieClip(moduleName, moduleId);
  45.                 loadMovie(modulePath, moduleName);
  46.             }
  47.         }
  48.     }
  49. };
  50. #endinitclip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement