PDA

View Full Version : load movie problem


toh
09-21-2002, 07:24 AM
i want to press a button to load an external swf into a target using: loadMovie("external.swf",target_name).

i had set the size of the target.
However the swf is bigger than the target (i mean the width and height), then only a certain part of the swf appear.

what can i do so that the external swf can fit into my new target when i press the button ????

Billy T
09-21-2002, 07:52 AM
make the target mc the same size as the external movie and then scale it down. When your external movie loads in it will scale down accordingly.

cheers

toh
09-21-2002, 08:52 AM
u mean: externalmovie._height = targetmc._height ;
externalmovie._width = targetmc._width;

but it still the same. may be i misunderstood ur explanation. please give more detail on it.

And if i have 5 button to load five different external movie(which is all different size), so, do i need to make all of them same size as target mc one by one??

sorry to ask so much as i am still a beginner in flash. (just touch it for about one week)

Billy T
09-21-2002, 08:59 AM
when you load a movie into an mc it takes on that mcs characteristics

ie if you have an mc that is 400 X 400 and you change its x scale to 50%. if you then load in your 600X400 external movie this will appear with an x scale of 50% - 300X400

same goes for rotation, alpha etc

probably the best thing to do it is just place a blank mc (nothing inside it) on the stage where you want the top left coprner of your external movies to appear

give it an instance name of blank

on your buttons have

on(release){
loadMovie("your.swf",_root.blank);
_root.blank._xscale=_root.blank._yscale=20;
}

or something like that

cheers

toh
09-21-2002, 05:41 PM
sorry to bother again.

the way that u told is actually scale down the external mc and then display, but not really fit into the blank mc that i had preset the size.

thats mean we have to do the scale down for every different mc with different percentage, cos they all have different sizes.

like in powerpoint, we can put a swf movie anyway we want, and we can adjust the size of the displayed movie anytime, bcos the flash mc will fit into the border we create, all the mc will be appear no matter how we change the size.

is there anyway that to do that in flash ?? thanx!