Section 1
//MainTimeline (dj_fla.MainTimeline)
package dj_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var progressText:TextField;
public var loader:Loader;
public var url:String;
public var params:Object;
public var request:URLRequest;
public var childDefinitions:LoaderContext;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number;
_local2 = (_arg1.bytesLoaded / _arg1.bytesTotal);
_local2 = Math.round((_local2 * 100));
this["progressText"].text = (("Loading... " + _local2.toString()) + "%");
}
public function onComplete(_arg1:Event):void{
var _local2:*;
while (numChildren > 0) {
removeChildAt(0);
};
_local2 = MovieClip(loader.content);
_local2.standalone = true;
stage.addChild(_local2);
}
function frame1(){
stop();
Security.allowDomain("boost.cachefly.net");
childDefinitions = new LoaderContext();
childDefinitions.applicationDomain = ApplicationDomain.currentDomain;
loader = new Loader();
params = LoaderInfo(loaderInfo).parameters;
if (params.url){
url = params.url;
} else {
url = "http://boost.cachefly.net/djbattle/swf/dj-battles.swf";
};
request = new URLRequest(url);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
loader.visible = false;
loader.load(request, childDefinitions);
}
}
}//package dj_fla