Thank you Helen I read your code and use it (as follows) ---------------------------------------------------------------------------- - // set up loader, an instance of MovieClipLoader, and loadHandler, the object // that will listen for its events ---------------------------------------------------------------------------- - var loader:MovieClipLoader = new MovieClipLoader(); var loadHandler:Object = new Object(); loader.addListener(loadHandler);
----------------------------------------------------------- // define what happens when the jpg is completely loaded ---------------------------------------------------------- loadHandler.onLoadInit = function(_mc:MovieClip) { _mc._xscale = 50; // here I instead put _mc._WIDTH = 300; _mc._yscale = 50; // here I put instead _mc._HEIGHT = 240; pct_mc._visible = false; }; -------------------------------------------------- // make pct_txt show cumulative loading progress ---------------------------------------------------- loadHandler.onLoadProgress = function(_mc:MovieClip, loaded:Number, total:Number) { pct_mc.pct_txt.text = Math.floor(loaded / total * 100) + "%"; }; loader.loadClip("oahupics/hanauma.jpg", holder_mc); ---------------------------------------------------------------------------- ------ but I have an error message : is it mandatory to use the "onLoadProgress " handler ? Where I have to put this code in the timeline ? or in the movie-cip "holder_mc" ? with an OnLoad ? Thank you again Tony ----- Original Message ----- From: "Helen Triolo" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> Sent: Thursday, February 02, 2006 4:35 PM Subject: Re: [Flashcoders] Constrain width and height of a swf into aMC withloadMovieNum or loadClip or loadMovie ? > Or if you do want to resize it, use MovieClipLoader and a handler > (instead of loadMovie) and do the resize in the onLoadInit function -- > example code in the 2nd blue box under MovieClipLoader on this page: > http://flash-creations.com/notes/dynamic_loadjpg.php > > Helen > > -- > http://flash-creations.com > http://i-technica.com > > > > j.c.wichman wrote: > > >Hi, > >Do you mean as in masking? > >If you don't want to resize the loaded swf, you could load it into a > >scrollpane (with scrollbars dis or enabled), or you could apply a runtime > >mask to your clip. > >eg myLoadedClip.setMask (myViewportMask) > > > >Greetz > >Hans > > > >-----Original Message----- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED] On Behalf Of a f > >Sent: Thursday, February 02, 2006 3:57 PM > >To: flashcoders@chattyfig.figleaf.com > >Subject: [Flashcoders] Constrain width and height of a swf into a MC > >withloadMovieNum or loadClip or loadMovie ? > > > > Hello, > > > > > >I try to understand how to constrain a swf of width = 500 , height = 300 in > >a movie-clip whose width=200 and height=247 without redimendionning the > >*.swf. > >(I know i will lose some visual information of the SWF, it is all right...) > > > >Do you know how to do that ? > > > >I just suceed to place the swf relative to a movie-clip with : > > movieclip_container.loadMovie("file.swf", level) but not to constrain > >this SWF to the movie-clip dimension. > > > > > > > > > >Thank you > >Tony > > > > > > > _______________________________________________ > 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