Sizing Dynamic Images

Sizing Dynamic Images

I am dynamically Loading a .jpg to a Movie Clip. The _mc is 160x130 pixels and the .jpg is 330 x 280.

The problem is this:
loadMovie(“data/Image1.jpg”, Image1_mc);
works fine but the Image1.jpg doesn’t fit inside the Image1_mc

Would there be a better way of importing an image to the Scene and resizing it.

I also want to make a button over effect so that the dynamically loaded image will show in a larger frame when the user wishes to see an enlargement of a thumbnail image.

So far I have used:
_root.Image1_btn.onRollOver = function() {
loadMovie(“data/Image1.jpg”, Large_mc);
But this then reloads Image1.jpg (freshly) into the Large_mc from the dynamic source and again fails to size the image.

after you’ve loaded the picture inside the movieclip, on the next frame, try this:

Large_mc._width = 160
Large_mc._height = 130

Just remember that you can’t rescale the movieclip holding the image until after the frame it was loaded into it. At least, that was the case in MX. If you don’t want it to be shown before it has been resized, I recommend putting a mask (a little square) away from the Large_mc clip when the image is loadet into it, then on the frame when it gets resized, remove the masking.

If it still doesn’t work, I’ll take a look at some of my scripts… This just kinda came into mind :slight_smile: