Section 1
//MainTimeline (rpgloli_fla.MainTimeline)
package rpgloli_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class MainTimeline extends MovieClip {
public var myPreloader:Preloader;
public var myRequest:URLRequest;
public var myLoader:Loader;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
myRequest = new URLRequest("http://images.4channel.org/f/src/sweetloli.swf");
myLoader = new Loader();
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN, showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, showContent);
myPreloader = new Preloader();
}
public function showProgress(_arg1:ProgressEvent):void{
var _local2:Number;
_local2 = (_arg1.bytesLoaded / _arg1.bytesTotal);
myPreloader.loading_txt.text = (("Loading - " + Math.round((_local2 * 100))) + "%");
myPreloader.bar_mc.width = (198 * _local2);
}
public function showContent(_arg1:Event):void{
removeChild(myPreloader);
addChild(myLoader);
}
public function showPreloader(_arg1:Event):void{
addChild(myPreloader);
myPreloader.x = (stage.stageWidth / 2);
myPreloader.y = (stage.stageHeight / 2);
}
}
}//package rpgloli_fla
Section 2
//Preloader (Preloader)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Preloader extends MovieClip {
public var bar_mc:MovieClip;
public var loading_txt:TextField;
}
}//package