home *** CD-ROM | disk | FTP | other *** search
- function loadSettings()
- {
- settings = new XML();
- settings.ignoreWhite = true;
- settings.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- renderSettings();
- }
- };
- settings.preload(fsp_path + "9430830/9430830/settings.xml",false);
- }
- function loadContent(content_info)
- {
- trace("loadContent");
- cd_content = new XML();
- cd_content.ignoreWhite = true;
- cd_content.onLoad = function(success)
- {
- this.clearLoadCheck();
- if(success)
- {
- initApp();
- }
- };
- cd_content.preload(fsp_path + content_info,false);
- }
- var mainTimeline = this;
- XML.prototype.checkLoadProgress = function()
- {
- var _loc2_ = Math.floor(this.getBytesLoaded() / 1024);
- var _loc3_ = Math.floor(this.getBytesTotal() / 1024);
- var _loc4_ = !isNaN(Math.floor(_loc2_ / _loc3_ * 100)) ? Math.floor(_loc2_ / _loc3_ * 100) : 0;
- this.onBytesLoaded(this.getBytesLoaded(),this.getBytesTotal(),_loc2_,_loc3_,_loc4_);
- };
- XML.prototype.clearLoadCheck = function()
- {
- if(this.loaderID)
- {
- clearInterval(this.loaderID);
- }
- };
- XML.prototype.preload = function(url, noCache)
- {
- trace("preload");
- this.clearLoadCheck();
- if(typeof noCache == "boolean" && noCache)
- {
- this.load(url + "?randomNum=" + random(999));
- }
- else
- {
- this.load(url);
- }
- this.loaderID = setInterval(this,"checkLoadProgress",200);
- };
- XML.prototype.sendAndPreload = function(url, resultXML, noCache)
- {
- this.clearLoadCheck();
- if(resultXML instanceof XML)
- {
- if(typeof noCache == "boolean" && noCache)
- {
- this.sendAndLoad(url + "?randomNum=" + random(999),resultXML);
- }
- else
- {
- this.sendAndLoad(url,resultXML);
- }
- this.loaderID = setInterval(this,"checkLoadProgress",200);
- }
- return false;
- };
-