[MX] Resize border to fit dynamic image?

I have a background with a border that is behind dynamic images. I am trying to resize the background to custom fit each jpg that is loaded. However, I cannot get the width/height from the movieclip the jpgs are loaded into and I can’t get the width/height from the jpgs. Anyone have any advice?

Here is what I tried:

setProperty("_root.serve_contents.photo_button.photo_background_image.subpages.photo_examples_bg", _height, getProperty(“examples/photo/event/amcel_medium.jpg”, _height));

and/or

setProperty("_root.serve_contents.photo_button.photo_background_image.subpages.photo_examples_bg", _height, getProperty(“photo_loader”, _height));

Thanks,
-Brandon