[Laszlo-dev] Re: how does direct media loading know when the movieclip is finished loading?

Adam Wolff adam at laszlosystems.com
Wed Feb 16 18:55:43 PST 2005


This is in the bottom of the testLoad function for LzMediaLoader.

There is no event from Flash that says that movie is loaded, so when
the total bytes == the loaded bytes, we know we're done.

         if ( this.mc.lmc.getBytesTotal() == 
this.mc.lmc.getBytesLoaded() ){
             //load is done
             this.onloaddone.sendEvent( this );
             //if mc.loaded is set, means returnData has already been 
called
             //(probably by error swf.)
             if ( !this.mc.loaded ){
                 this.returnData( this.mc.lmc );
             }
         }

Henry Minsky wrote:
 > OK I am confused. When the LzMediaLoader starts loading an image
 > (either proxied or direct) how does it know
 > when the image has finished loading, so that it can indicate that the
 > connection is free for another request to use?
 >
 >
 >




More information about the Laszlo-dev mailing list