Dynamically Resize Movieclip

Hey guys, question for ya. I’m looking for a way to load an image through XML, and resize it to fit to a certain box size I specify.

Heres what I have so far:

/////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("test.xml");
//////////////////////////////////////
function firstImage() {
var maxWidth = 200;
//original width of container
var maxHeight = 100;
//original height of container
container_mc.loadMovie(image[0], 1);
if (container_mc._width>=200) {
var ctnrWidth = container_mc._width;
// Calculate percentage by which image will need to change to fit 
scalePercent = (ctnrWidth>maxWidth) ? maxWidth*100/ctnrWidth : scalePercent;
container_mc._xscale = scalePercent;
}
if (container_mc._height>=100) {
var ctnrHeight = container_mc._height;
// Calculate percentage by which image will need to change to fit
scalePercent = (ctnrHeight>maxHeight) ? maxHeight*100/ctnrHeight : scalePercent;
container_mc._yscale = scalePercent;
}
}
/////////////////////////

Thanks in advance.

EDIT: Removed Broken URL