1 Reply Latest reply on Apr 17, 2010 12:31 PM by lite_As_AIR

    web browser progress bar

    lite_As_AIR Level 1

      how do i make a progress bar for a htmlLoader (the progress bar shows how much of the html page has been downloaded). here is my attempt :

       

      the air flash file consists of 1 button "browseButton" and the following document class :

       

      public function WebBrowser():void

      {

           browseButton.addEventListener(MouseEvent.CLICK, onClick);

       

           browser = new HTMLLoader();

           browser.addEventListener(Event.COMPLETE, onComplete);

       

           addChild(browser);

      }

       

      private function onClick(e:MouseEvent):void

      {

           trace("loading " + addressLink.text);

           browser.load(new URLRequest(addressLink.text));

           browser.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProceed);

      }

      private function onProceed(e:ProgressEvent):void

      {

           trace("loading",e.bytesLoaded);

      }

       

      but as expected (in accordance with the documentation) the loaderInfo does not return the progress information of the currently loading html page, in fact it is not even get called and the trace statement is not executed at all. so is there any way of finding out the progress information of the html page at all ??

       

      any help is appreciated

      thanks!