Loading an asp document
Hi, im stil a littlebit new to as3, and i was wondering if somewhone could help me with this problem:
when im trying to load an asp document the loader doesnt remove itself and it stops at 100% load
if i try a jpg file it works perfectly, but thats not what i want xD
---------------------------------------------------------------------------------------------------------------------------------------------------
var myRequest:URLRequest = new URLRequest("/aspindex.asp");
var myLoader:Loader = new Loader();
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
var myPreloader:Preloader = new Preloader();
function showPreloader(event:Event):void {
addChild(myPreloader);
myPreloader.x = stage.stageWidth/2;
myPreloader.y = stage.stageHeight/2;
}
function showProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
myPreloader.loading_txt.text = "Loading - " + Math.round(percentLoaded * 100) + "%";
myPreloader.bar_mc.width = 1015 * percentLoaded;
}
function showContent(event:Event):void {
removeChild(myPreloader);
addChild(myLoader);
}
---------------------------------------------------------------------------------------------------------------------------------------------------