Is there a way to make a preloader for htmlLoader?
I have a htmlLoader in my project, and I want to make a visual loading bar to display before it loads my site, then to disappear when it's fully loaded. Is there a way to do this?
I have a htmlLoader in my project, and I want to make a visual loading bar to display before it loads my site, then to disappear when it's fully loaded. Is there a way to do this?
// create a preloaer movieclip
var preloader:MovieClip = new Preloader();
addChild(preloader);
var html:HTMLLoader = new HTMLLoader();
var urlReq:URLRequest = new URLRequest("http://www.adobe.com/");
html.width = stage.stageWidth;
html.height = stage.stageHeight;
html.addEventListener(Event.COMPLETE,loadcompleteF);
html.load(urlReq);
function loadcompleteF(e:Event):void{
removeChild(preloader);
preloader=null;
addChild(html);
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.