RE: [Flashcoders] Movie Clip Loaded or not
Hi sumeet, You can put the check through onLoad Handler of movie clip. mc.onLoad = doOnLoad; function doOnLoad() { clearInterval (id) } Regards, Gaurav Kaushal. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sumeet Kumar Sent: Thursday, December 22, 2005 3:53 PM To: Flashcoders mailing list Subject: [Flashcoders] Movie Clip Loaded or not Hi All I m using loadMovie Command to load a image in an empty Movieclip. but how to check whether the image is loaded or not. i.e mc.loadMovie (image.jpg) id = setInterval(fnCheckUploading,1) fnCheckUploading =function () { if (mc._width2){ clearInterval (id) } } Now in my case the width of the image can be even 1 pixel. So any one please guide me how to put a check. Regards Sumeet Kumar ___ 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] Movie Clip Loaded or not
Sumeet Kumar schrieb: Hi All I m using loadMovie Command to load a image in an empty Movieclip. but how to check whether the image is loaded or not. i.e mc.loadMovie (image.jpg) id = setInterval(fnCheckUploading,1) fnCheckUploading =function () { if (mc._width2){ clearInterval (id) } } Now in my case the width of the image can be even 1 pixel. So any one please guide me how to put a check. Well, this one is quite simple: Make a movie clip which will hold the image, add several frames to it, so that the _totalframes 1, and then load the image, using the same name for the mc it already has, e.g. create an mc with, say, 5 frames, then do a imageholder_mc.loadMovie(your_image.jpg); To the 5-frames-mc you can then add the folloging AS: onClipEvent(load) { if (this._totalframes == 1) { ... } } since as soon the image has been loaded the mc will have 1 frame only. Regards, Roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 66 88 81 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Movie Clip Loaded or not
Use loadClip(). Using this method instead of loadMovie() or MovieClip.loadMovie() has a number of advantages. The following handlers are implemented by the use on a listener object: MovieClipLoader.onLoadStart handler is invoked when loading begins. MovieClipLoader.onLoadError handler is invoked if the clip cannot be loaded. MovieClipLoader.onLoadProgress handler is invoked as the loading process progresses. MovieClipLoader.onLoadInit handler is invoked after the actions in the first frame of the clip have executed, so you can begin manipulating the loaded clip. MovieClipLoader.onLoadComplete handler is invoked when a file has completed downloading. - Original Message - From: Sumeet Kumar [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, December 22, 2005 10:23 AM Subject: [Flashcoders] Movie Clip Loaded or not Hi All I m using loadMovie Command to load a image in an empty Movieclip. but how to check whether the image is loaded or not. i.e mc.loadMovie (image.jpg) id = setInterval(fnCheckUploading,1) fnCheckUploading =function () { if (mc._width2){ clearInterval (id) } } Now in my case the width of the image can be even 1 pixel. So any one please guide me how to put a check. Regards Sumeet Kumar ___ 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