# Resize Images

**URL:** <https://forum.kirupa.com/t/resize-images/188604>\
**Category:** flash\
**Created:** [May 9, 2006, 11:01am UTC](https://forum.kirupa.com/t/resize-images/188604 "2006-05-09T11:01:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Monkeyspoon](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Monkeyspoon](https://forum.kirupa.com/u/Monkeyspoon)\
**Post date:** [May 9, 2006, 11:01am UTC](https://forum.kirupa.com/t/resize-images/188604/1 "2006-05-09T11:01:48Z")

</div>

Im creating an XML/FLash slideshow.

Some slides are larger than the space and some are way too small.

When linking from an XML file to images how do i determine the size of the images and then resize them accordingly so that it maximises the space available. For example a landscape image needs to be resized until it meets the maximum width allowed and the height would of course increase/decrease accordingly and of course the opposite for a portrait shot.

function updateSlide(newSlideNode) {  
imagePath = newSlideNode.attributes.jpegURL;  
slideText = newSlideNode.firstChild.nodeValue;  
loadMovie(imagePath, targetClip);  
targetClip.\_x=0;  
targetClip.\_y=0;

so im looking for somethig to put at the end of this to resize targetClip appropriately. Please please please help me
