Groups | Blog | Home
all groups > flash actionscript > october 2004 >

flash actionscript : can I change size of externally loaded swf's?


bekstar
10/1/2004 6:22:24 AM
Hi Scripties

I need to know if I can externally load my animation into my main movie at a
reduced size - say 60% as it would be incredibly labour intensive to go and to
the animation again to fit into this interface....

(see current actionscript below... obviously the movie that is loading is what
is playing above the menu bar)

http://www.digitalmonkey.com.au/2004/flash/index.htm

var x = "news";
stop();
if(this.thumb_mc == Number(this.thumb_mc)){
loadMovieNum("th_intro_final.swf",this.thumb_mc);
} else {
this.thumb_mc.loadMovie("intro_final.swf");
}


Thank you
Jensen
10/1/2004 11:13:04 AM
Hi!

Yes, you can. In your main file, create an MC and load the .swf into that
MC. Then after the file is fully loaded you can change the ._width and
.._height of that MC.

/Jensen/

Rothrock
10/2/2004 4:23:41 PM
I wouldn't change the width and height. Because you would need to know the
ratio or it will distort the movieclip.

Instead I would use this line:

myMovieClip._xscale = myMovieClip._yscale=60;

If you are using the MovieClipLoader in MX04, I would use the onLoadInit event
not the onLoadComplete. I'm not exactly sure how to do this with earlier
versions of Flash, but I would wait until _width>0. Good luck.
AddThis Social Bookmark Button