0 Replies Latest reply on Oct 9, 2010 5:17 AM by Ivan Najman

    HTMLLoader fires complete event too soon ?

    Ivan Najman

      Hi to all,


      I have following problem i`m displaying pdf in a nativewindow (pdf is around 5 mb so i guess it takes some time to be rendered) I want to show user some custom progress bar until pdf is prepared to be shown in htmlLoader.The problem is that Event.COMPLETE is being dispatched too soon, pdf is not prepared to be shown.I tried with HTML_DOM_INITIALIZE event but same thing happened.


      I don`t want users to see empty window, i want to either progress bar or fully loaded PDF be shown.


      I figure out some workaround : i will download file from the location and open it up with openWithDefaultApplication() option within AIR 2, but i want to now if i can do it the way i wanted at the first place.



      Am i doing something wrong or there is some problem with HTMLLoader ?


      Here is simple code:


      htmlLoader.location = url;






      onLoad (...)
      //hide progress bar