# XML image resize question

**URL:** https://forum.kirupa.com/t/xml-image-resize-question/282905
**Category:** flash
**Created:** [February 27, 2009, 5:15pm UTC](https://forum.kirupa.com/t/xml-image-resize-question/282905 "2009-02-27T17:15:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kcanimator](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kcanimator](https://forum.kirupa.com/u/kcanimator)
#### Post date: [February 27, 2009, 5:15pm UTC](https://forum.kirupa.com/t/xml-image-resize-question/282905/1 "2009-02-27T17:15:05Z")

</div>

Hello. I am pretty new to xml (and understand just a little actionscript 2.0) so please bear with me.

I have a functioning flash file that loads text and images dynamically from my xml file. Everything is working fine, but I was wondering if there is a quick code to change the image size when they are loaded into my empty mc?

Here is the code I have so far (real basic):

Thanks to anyone that can help:

var myXML:XML = new XML();  
myXML.ignoreWhite = true;  
myXML.load(“upcoming2.xml”);

myXML.onLoad = function(success){  
if (success) {  
var xml:Array = myXML.firstChild.childNodes;  
var img:String = xml[5].attributes.url;  
var img2:String = xml[11].attributes.url;  
var img3:String = xml[17].attributes.url;  
var img4:String = xml[23].attributes.url;

date1.htmlText = xml[0].firstChild.nodeValue;  
time1.htmlText = xml[1].firstChild.nodeValue;  
show1.htmlText = xml[2].firstChild.nodeValue;  
link.strURL = xml[3].attributes.url;  
headliner1.htmlText = xml[4].firstChild.nodeValue;  
poster1\_mc.loadMovie(img);

date2.htmlText = xml[6].firstChild.nodeValue;  
time2.htmlText = xml[7].firstChild.nodeValue;  
show2.htmlText = xml[8].firstChild.nodeValue;  
links.strURL = xml[9].attributes.url;  
headliner2.htmlText = xml[10].firstChild.nodeValue;  
poster2\_mc.loadMovie(img2);

date3.htmlText = xml[12].firstChild.nodeValue;  
time3.htmlText = xml[13].firstChild.nodeValue;  
show3.htmlText = xml[14].firstChild.nodeValue;  
linkss.strURL = xml[15].attributes.url;  
headliner3.htmlText = xml[16].firstChild.nodeValue;  
poster3\_mc.loadMovie(img3);

date4.htmlText = xml[18].firstChild.nodeValue;  
time4.htmlText = xml[19].firstChild.nodeValue;  
show4.htmlText = xml[20].firstChild.nodeValue;  
linksss.strURL = xml[21].attributes.url;  
headliner4.htmlText = xml[22].firstChild.nodeValue;  
poster4\_mc.loadMovie(img4);

link.onPress = function()  
{  
getURL(this.strURL);  
}  
links.onPress = function()  
{  
getURL(this.strURL);  
}

linkss.onPress = function()  
{  
getURL(this.strURL);  
}

linksss.onPress = function()  
{  
getURL(this.strURL);  
}

}  
}
