HELP - dynamic border + shadow

I am building a gallery of images.

I would like to load each image into its container by using the containers <instance name> (not sure how to write this : (“images/”+instanceName+".jpg");

Then add a 5px border and drop shadow to each gallery item dynamically based on the image size (They are all different sizes).

I’ve been searching and playing around but could not get exactly what i’m looking for…

Here is the code I’m working with now which kind of works
not loading in the way i want however

Actionscript on imageContainer1
ActionScript Code:
[LEFT][COLOR=#0000FF]onClipEvent[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“photo”[/COLOR], [COLOR=#FF0000]“photo1”[/COLOR], [COLOR=#000080]5[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“shadow”[/COLOR], [COLOR=#FF0000]“shadow1”[/COLOR], [COLOR=#000080]4[/COLOR][COLOR=#000000])[/COLOR];
shadowAmount = [COLOR=#000080]5[/COLOR];
borderAmount = [COLOR=#000080]3[/COLOR];
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]shadow1[/COLOR].[COLOR=#0000FF]_width[/COLOR] = [COLOR=#0000FF]this[/COLOR].[COLOR=#000080]photo1[/COLOR].[COLOR=#0000FF]_width[/COLOR]+shadowAmount;
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]shadow1[/COLOR].[COLOR=#0000FF]_height[/COLOR] = [COLOR=#0000FF]this[/COLOR].[COLOR=#000080]photo1[/COLOR].[COLOR=#0000FF]_height[/COLOR]+shadowAmount;
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]shadow1[/COLOR].[COLOR=#0000FF]_x[/COLOR] = shadowAmount;
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]shadow1[/COLOR].[COLOR=#0000FF]_y[/COLOR] = shadowAmount;
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]border1[/COLOR].[COLOR=#0000FF]_width[/COLOR] = [COLOR=#0000FF]this[/COLOR].[COLOR=#000080]photo1[/COLOR].[COLOR=#0000FF]_width[/COLOR]+borderAmount;
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]border1[/COLOR].[COLOR=#0000FF]_height[/COLOR] = [COLOR=#0000FF]this[/COLOR].[COLOR=#000080]photo1[/COLOR].[COLOR=#0000FF]_height[/COLOR]+borderAmount;
[COLOR=#000000]}[/COLOR]
[/LEFT]

I need to somehow replace this
ActionScript Code:
[LEFT][COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“photo”[/COLOR], [COLOR=#FF0000]“photo1”[/COLOR], [COLOR=#000080]5[/COLOR][COLOR=#000000])[/COLOR];
[/LEFT]

so that it will load an external image using something like this
ActionScript Code:
[LEFT]container.[COLOR=#0000FF]loadMovie[/COLOR]COLOR=#000000[/COLOR];
[/LEFT]

But the problem is, when I just replace it with loadMovie,
the shadow is no longer added.

Also, if I add this
ActionScript Code:
[LEFT]imageName = [COLOR=#FF0000]“name of file to load”[/COLOR];
[/LEFT]

In the onEnterFrame or on the actual frame, it is not being recognized and is trying to load “http://www.ultrashock.com/forums/images/.jpeg” instead of “inages/test1.jpg”

Please, any help would be greatly appreciated. Thanks