Re: [Flashcoders] do we still have to check to see if loaded >10bytes?
Hey thanks for the tip Muzak. It either does not work or I am coding it wrong in my source. I have a feeling my problem stems from this inside the Imageloader code. // remove original bitmap inTarget.unloadMovie(); inTarget.removeMovieClip(); delete inTarget; The inside of my movie is getting switched from the time it appears on the stage to when it is loaded. Plus what I am trying to get is the dimensions of the MC once it is finished loading, so that doesn't help. Along the way I wanted to put a progress bar and a text area showing the percent loaded. But the movieclips contents are changed on the fly and I dont know enough code to make it work. I need to go back to school evidently. But thanks for the response. I'll let you know if I FINALLY get it. Karl DeSaulniers Design Drumm http://designdrumm.com On Mar 24, 2009, at 6:15 PM, Muzak wrote: Not sure, my AS2 is *very* rusty, but think this should work: import com.martijndevisser.ImageLoader; function onLoadProgress(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace("Application ::: onLoadProgress"); trace("- target: " + target) trace("- bytesLoaded: " + bytesLoaded); trace("- bytesTotal: " + bytesTotal); } function onLoadInit(target:MovieClip):Void { trace("Application ::: onLoadInit"); trace("- target: " + target); } var loader:ImageLoader = new ImageLoader(); loader.addListener(this); loader.loadImage( "some_image.jpg", image_mc ); regards, Muzak - Original Message - From: "Karl DeSaulniers" To: "Flash Coders List" Sent: Tuesday, March 24, 2009 9:19 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded >10bytes? No. This project is still as2 Sent from losPhone On Mar 24, 2009, at 3:03 PM, "Muzak" wrote: I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for- flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded >10bytes?
Thanks, I will try that. Sent from losPhone On Mar 24, 2009, at 6:15 PM, "Muzak" wrote: Not sure, my AS2 is *very* rusty, but think this should work: import com.martijndevisser.ImageLoader; function onLoadProgress(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace("Application ::: onLoadProgress"); trace("- target: " + target) trace("- bytesLoaded: " + bytesLoaded); trace("- bytesTotal: " + bytesTotal); } function onLoadInit(target:MovieClip):Void { trace("Application ::: onLoadInit"); trace("- target: " + target); } var loader:ImageLoader = new ImageLoader(); loader.addListener(this); loader.loadImage( "some_image.jpg", image_mc ); regards, Muzak - Original Message - From: "Karl DeSaulniers" > To: "Flash Coders List" Sent: Tuesday, March 24, 2009 9:19 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded >10bytes? No. This project is still as2 Sent from losPhone On Mar 24, 2009, at 3:03 PM, "Muzak" wrote: I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for- flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded >10bytes?
Not sure, my AS2 is *very* rusty, but think this should work: import com.martijndevisser.ImageLoader; function onLoadProgress(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace("Application ::: onLoadProgress"); trace("- target: " + target) trace("- bytesLoaded: " + bytesLoaded); trace("- bytesTotal: " + bytesTotal); } function onLoadInit(target:MovieClip):Void { trace("Application ::: onLoadInit"); trace("- target: " + target); } var loader:ImageLoader = new ImageLoader(); loader.addListener(this); loader.loadImage( "some_image.jpg", image_mc ); regards, Muzak - Original Message - From: "Karl DeSaulniers" To: "Flash Coders List" Sent: Tuesday, March 24, 2009 9:19 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded >10bytes? No. This project is still as2 Sent from losPhone On Mar 24, 2009, at 3:03 PM, "Muzak" wrote: I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for- flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded > 10bytes?
No. This project is still as2 Sent from losPhone On Mar 24, 2009, at 3:03 PM, "Muzak" wrote: I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for- flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak - Original Message - From: "Karl DeSaulniers" > To: "Flash Coders List" Sent: Tuesday, March 24, 2009 5:50 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded > 10bytes? I have an issue with dynamic content not triggering my code when its complete. I am trying to call the progress from a external class.. any sample code that anyone can give to implement this easily. The class is com.martijndevisser.ImageLoader Please pardon my Newbieizm I am self taught AS2 and evidently I havent taught myself enough. : | Karl DeSaulniers Design Drumm http://designdrumm.com On Mar 24, 2009, at 11:41 AM, Muzak wrote: In AS3 you usually listen for the "complete" event, which is triggered when loading is completed. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded > 10bytes?
I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for-flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak - Original Message - From: "Karl DeSaulniers" To: "Flash Coders List" Sent: Tuesday, March 24, 2009 5:50 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded > 10bytes? I have an issue with dynamic content not triggering my code when its complete. I am trying to call the progress from a external class.. any sample code that anyone can give to implement this easily. The class is com.martijndevisser.ImageLoader Please pardon my Newbieizm I am self taught AS2 and evidently I havent taught myself enough. : | Karl DeSaulniers Design Drumm http://designdrumm.com On Mar 24, 2009, at 11:41 AM, Muzak wrote: In AS3 you usually listen for the "complete" event, which is triggered when loading is completed. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded > 10bytes?
Yes indeed. I had my mind on onProgress. Doh! Doing too much AS2 perhaps.. Paul - Original Message - From: "Muzak" To: "Flash Coders List" Sent: Tuesday, March 24, 2009 4:41 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded > 10bytes? In AS3 you usually listen for the "complete" event, which is triggered when loading is completed. regards, Muzak - Original Message - From: "allandt bik-elliott (thefieldcomic.com)" To: "Flash Coders List" Sent: Tuesday, March 24, 2009 5:03 PM Subject: [Flashcoders] do we still have to check to see if loaded > 10 bytes? in as2 there used to be a thing where you had to check to make sure loaded was above 10 bytes or it would sometimes give a false reading (so you might see if (this.getBytesLoaded == this.getBytesTotal() && this.getBytesLoaded > 10) for instance) does the same apply to as3 or can i safely leave that part out of my code? thanks a ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders