# FMX - PLEASE HELP ME - Loading an image to fit a specific size using XML

**URL:** <https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773>\
**Category:** flash\
**Created:** [September 29, 2004, 2:12pm UTC](https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773 "2004-09-29T14:12:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trickyme](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@trickyme](https://forum.kirupa.com/u/trickyme)\
**Post date:** [September 29, 2004, 2:12pm UTC](https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773/1 "2004-09-29T14:12:12Z")

</div>

Ive been searching high and low to find out how i can dynamically load an image into a container [i.e. im using the xml\_photogallery tut. template] and setting it so that it scales to fit specific dimensions.

At the moment Im having to resize images in photoshop so that it fits with in the container/webcontents dimensions. Otherwise different images with different sizes will bleed on main body of the site.

Any help would be much appreciated and im sure the answer is out there somewhere…

:sigh:

---

<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:** [September 30, 2004, 6:50am UTC](https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773/2 "2004-09-30T06:50:58Z")

</div>

You can set the dimensions after the image is fully loaded, but you have to realize that this way, if the images have different proportions, they might distort.

scotty(-:

---

<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:** [September 30, 2004, 8:15am UTC](https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773/3 "2004-09-30T08:15:52Z")

</div>

Hi !!!

Read this thread: Best Of Kirupa

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

---

<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:** [September 30, 2004, 9:54am UTC](https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773/4 "2004-09-30T09:54:43Z")

</div>

> [@scotty](#):
>
> You can set the dimensions after the image is fully loaded, but you have to realize that this way, if the images have different proportions, they might distort.
> 
> scotty(-:

Thanks for the help guys. thats helped me out loads!! …

but…

Scotty, i was wondering, what sort of AS would i need to get the image to resize, not the empty movie clip. I think thats the vital little piece of information that i need to understand really.

---

<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:** [September 30, 2004, 12:48pm UTC](https://forum.kirupa.com/t/fmx-please-help-me-loading-an-image-to-fit-a-specific-size-using-xml/65773/5 "2004-09-30T12:48:58Z")

</div>

Can you post what you’ve got this far?

scotty(-:
