10 Replies Latest reply on Apr 17, 2009 6:23 PM by Michael Borbor

    Error when determining loaded image size: The loading object is not sufficiently loaded to provide this information.

    Moenizzle

      Hi,

       

      I am trying to load and image and determine its dimension right after loading.  I am using a Loader object and check the width when the Event.COMPLETE event of the Loader's contentLoaderInfo object is fired...

       

      myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);

       

      Then:

       

      public function onLoadComplete(event:Event)

      {

       

           trace(myLoader.width); // 0

           trace(myLoader.contentLoaderInfo.width); // Error: The loading object is not sufficiently loaded to provide this information.

      }

       

      I've tried something similar with the Event.INIT event but same result.  Any ideas on the best way to work around this?

       

      Thanks!

      Moshe