# Sizing Dynamic Images

**URL:** https://forum.kirupa.com/t/sizing-dynamic-images/60372
**Category:** flash
**Created:** [August 9, 2004, 11:44am UTC](https://forum.kirupa.com/t/sizing-dynamic-images/60372 "2004-08-09T11:44:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pallothu\_ashok](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pallothu\_ashok](https://forum.kirupa.com/u/pallothu_ashok)
#### Post date: [August 9, 2004, 11:44am UTC](https://forum.kirupa.com/t/sizing-dynamic-images/60372/1 "2004-08-09T11:44:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 9, 2004, 12:13pm UTC](https://forum.kirupa.com/t/sizing-dynamic-images/60372/2 "2004-08-09T12:13:47Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 9, 2004, 1:47pm UTC](https://forum.kirupa.com/t/sizing-dynamic-images/60372/3 "2004-08-09T13:47:44Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?t=51430](http://www.kirupaforum.com/forums/showthread.php?t=51430)  
??

scotty(-:
