Loading External images - with Array

Hey everyone.

I’m trying very hard to get this code to load images external, with a next & prev btn.
I have a grid of photos set up and each photo is a btn that loads the larger photo in my container_mc.

Now i want a next button to load the next photo from which ever photo its on.

Ive tried this code but its not working.

Please if anyone has any ideas, i would really be love it!!

thanks

Kym

var NumberOfImages = 4;

var LocationToImages = “Portfolio/”;

var FileType = “.jpg”;

var myArray = new Array();

myArray[ 0] = “futbol1.jpg”;
myArray[ 1] = “futbol2.jpg”;
myArray[ 2] = “futbol3.jpg”;
myArray[ 3] = “futbol4.jpg”;

var i:Number = 0;
next.onPress=function(){

i++;
container_mc.loadMovie(myArray*;
if(i>=myArray.length-1);
{
trace(“no more images!”);
i = myArray.length-1;
}
}
//
prev.onPress=function()
{
i–;

container_mc.loadMovie(myArray*;
if(i<=0)
{
trace(“no more images!”);
i = 0;
}
}