Simple Load and Replace Script

Hi,

Really simple question I am Still learining to code in AS3 I was working in AS1 for so long that AS3 is still a learning curve for me.

Simply put I have a simple portfolio viewer I am trying to set up.

I have 3 images ( for my simple version )

they are all the final size for my main viewing area.

585x436 they will be displayed to the right of that image as thumbnails.

(using the same moveclip instance) 155x116 to fit in the boxes with listners
e.g. “picture1”, “picture2”, “picture3” ( thumbnails )

and the main instance ( large size ) labeled “mainframe”

So what I currently have is :

picture1.addEventListener(MouseEvent.CLICK,picture1e);
picture2.addEventListener(MouseEvent.CLICK,picture2e);
picture3.addEventListener(MouseEvent.CLICK,picture3e);
closebutton.addEventListener(MouseEvent.CLICK,closewindow);

function picture1e(myEvent:MouseEvent):void
{
picture1.attachMovie( “mainframe”, “picture01”, 2 );
}

function picture2e(myEvent:MouseEvent):void
{
picture2.attachMovie( “mainframe”, “picture02”, 2 );
}

function picture3e(myEvent:MouseEvent):void
{
picture3.attachMovie( “mainframe”, “picture03”, 2 );
}

function closewindow(myEvent:MouseEvent):void
{
}

The image of this viewer is attached… I am in desperate need of help…
I have tried everything to figure this out and any help would be greatly
apprecated!!!

This is all inside a movieclip called object0

Something as simple as haveing images replace a main image in a fixed
location and they are all the same size should be so simple to do! whats
sad is I did this in PHP about a month ago with no problem but AS3 has me
stumped!!!

p.s. Eventually I am going to have 16 of these in 1 flash file so I am tring to
make it as simple as possible… I don’t know if a load or unload movie clip
would help me out here???