Resizing external swfs on load

Well Ive searched everywhere but havent found a answer to my question so here it goes. I have 3 swf videos that I made a few months ago and dont have the originals anymore so I can resize the files themselves so Im kinda having problems. I am making a random video playing banner and cant get my old swf files to resize to the dimensions I need them too…

heres the actionscript Im using so far…

 filename = ["escalade.swf", "1ce.swf", "lexani.swf"]; 
path = "c:/documents and settings/zerosignal/desktop/header template/"; 
i = filename.length; 
k = Math.floor(Math.random()*i); 
loadMovie(path+filename[k], load); 
 

note: path is just temporary

By the look of your script, “load” is the mc where you are loading the banners. If this is correct, then all you have to do is scale the “load” mc. You could get the width and height properties of the loaded banner so that you know how much to scale the “load” mc.

I dont think that can work… Heres the specs of what I have to do. My biggest swf that Im loading under the mask is w760 h 300. the rest of my swf files are smaller than that dimension wise but I want the smaller videos to still load into 760/300. I just cant seem to get this solved by myself Ive been trying all day. Anyones help would be greatly appriciated!

It can work.

Let’s say you are loading your random movies into a movie clip called “load_mc”. Load_mc is a movie clip with a 760x300 rectangle, 0% alpha, no line. Put it on a layer and turn the layer to outlines so you can see where it is. This is just a tip for making your files easier to work with.

Make sure you have applied the instance name to load_mc.

When you load the random movie clip, load_mc will take on all the properties of the loaded clip, ie. it’s width and height. The following script might help:
[AS]
var ad_number = 10; //this is the number of movies you have to choose from
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 != 760){
_root.load_mc._width = 760;
}
if(ad_height != 300){
_root.load_mc._height = 300;
}
[/AS]
This will resize your loaded clips but it night also squish them if they don’t have the 760:300 ratio.

If you don’t want them squished, play with this:
[AS]
var ad_number = 10; //this is the number of movies you have to choose from
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 < 760){
_root.load_mc._width = 760;
_root.load_mc._xscale = _root.load_mc._yscale;
}else if(ad_height < 300){
_root.load_mc._height = 300;
_root.load_mc._xscale = _root.load_mc._yscale;
}
[/AS]
No guarantees as I’m just making it up, but I think it should work.