Resizing loaded images

oh so ive been looking around and cant find the answer to this…
im loading images into a gallery type movie. in my function thats called when the loading is complete i try to resize the image using maybe different methods.

1)tried setting the loaders width and height
2)tried setting the loaders.content width and height
3) calculating the scaleing factor to and using the loaders scaleX and scaleY
this then caused it to scale only in the y. at first thought it was trying to maintain aspect but then relized (when giving up and scaling so the largest side still fit) that the x isnt changing at all? i then tried just changing the scaleX and it doesnt do anything?

code im using:
ActionScript Code:
[FONT=Courier New][LEFT]myLoader.[COLOR=#000080]scaleX[/COLOR] = [COLOR=#000080]520[/COLOR]/myLoader.[COLOR=#000080]contentLoaderInfo[/COLOR].[COLOR=#0000FF]width[/COLOR];
myLoader.[COLOR=#000080]scaleY[/COLOR] = [COLOR=#000080]300[/COLOR]/myLoader.[COLOR=#000080]contentLoaderInfo[/COLOR].[COLOR=#0000FF]height[/COLOR];
[/LEFT]
[/FONT]
if i take out the Y line nothing happens its as if it doenst run the scaleX

i’m trying to do this exact thing. here is the code.

var photoLoader:UILoader = new UILoader();
photoLoader.maintainAspectRatio = false;
photoLoader.width = photoLoader.content.width;
photoLoader.height = photoLoader.content.height;
photoLoader.y = 0;
photoLoader.x = 0;
photoLoader.buttonMode = true;
photoLoader.addEventListener(MouseEvent.CLICK,onClickBack);
loaderHolder.addChild(photoLoader);

when i run the test movie i’m getting flash erro #1009

i’m not exactly sure, but i think it’s because the content isn’t loaded so it can’t access the width and height of the pictures. any ideas? or do i actually have to create a child in the xml with the width and height parameters?