# Load Random Movie Clips & Resize

**URL:** <https://forum.kirupa.com/t/load-random-movie-clips-resize/146115>\
**Category:** Uncategorized\
**Created:** [April 28, 2005, 10:51am UTC](https://forum.kirupa.com/t/load-random-movie-clips-resize/146115 "2005-04-28T10:51:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tannia](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@Tannia](https://forum.kirupa.com/u/Tannia)\
**Post date:** [April 28, 2005, 10:51am UTC](https://forum.kirupa.com/t/load-random-movie-clips-resize/146115/1 "2005-04-28T10:51:08Z")

</div>

I am pretty new to Flash. I read the tutorial on loading random movies and used the code provided in the tutorial, which worked very well, but I have a problem with the movie sizes. The code used was:

\*filename = [“movie1.swf”,“movie2.swf”,“movie3.swf”];  
path = “spiffs2/”;  
i = filename.length;  
k = Math.floor(Math.random()_i);  
loadMovie(path+filename[k], load\_mc);_

As you can see I am loading the 3 numbered movies from my “spiffs2” folder into an empty mc with an instance name of “load\_mc”. My problem is that the 3 movies are all different sizes and I want them to adopt the dimensions of the empty movie clip, which is 150w by 100h.  
I also tried the following code found in this forum after moving the 3 movies to the same folder:

_var ad\_number = 3; //number of movies  
loadMovie(“banner”+random(ad\_number)+".swf", \_root.load\_mc);  
var ad\_width = \_root.load\_mc.\_width;  
var ad\_height = \_root.load\_mc.\_height;  
if (ad\_width \> 150) {  
\_root.load\_mc.\_width = 150;  
\_root.load\_mc.\_xscale = \_root.load\_mc.\_yscale;  
} else if (ad\_height \> 100) {  
\_root.load\_mc.\_height = 100;  
\_root.load\_mc.\_xscale = \_root.load\_mc.\_yscale;  
}_

The movies load with this code also, but they do not resize as I expected.  
Can someone please give me a hand with this? It’s probably a simple thing, but I have tried again and again and can’t find the answer anywhere.  
Thanks in advance for any help!
