14 Replies Latest reply on Apr 19, 2013 4:42 PM by joe_valenzuela

    LoaderInfo class doesn't dispatch Init and Complete events

    elenaalex

      Hi,

      I use the traditional way to download jpeg images (size < 200K) dynamically:

       

      {
          ...
          
          try {
           contentLoader = new Loader();
           contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
           contentLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
           contentLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
           contentLoader.loadBytes(loader.data as ByteArray);
          } catch (error:Error) {
             trace (error.toString());
          }
      }

      private function onInit(event:Event):void {
           trace ("onInit");
      }

      private function onLoadComplete(evt:Event):void {
           token.result = (evt.target as LoaderInfo).content as Bitmap;
           ...
      }

       

      I have noticed that sometimes class LoaderInfo doesn't dispatch neither INIT nor COMPLETE event working with the same images. There is no IO_ERROR dispatched as well. All images are small (< 200K).

       

      I suppose that this is a bug in the Flash Player.