PREV and NEXT buttons ; 3.0

Hello guys. I ran into another wall, and it’s just my inexperience. I’m getting experience by the day and by the project.

Here’s my problem. I’m trying to build a simple photo gallery with Next and Previous buttons without alot of classes and any xml and alot of code. The image locations are in an array. Also, I need the name of the current image to be stored in a variable for other purposes. Here’s the latest version of my code; I’ve been trying alot of things to no avail guys:

var myPlace:Loader = new Loader();
myPlace.x=50.0
myPlace.y=50.0
addChild(myPlace);

var theImages:Array=new Array(“mercedes1”,“mercedes2”,“mercedes3”);

var currentImage:Number;
var previousImage:Number;
var currentImageName=event.target;

prevImage.addEventListener(MouseEvent.CLICK,prevClicked,false,0,true);
nextImage.addEventListener(MouseEvent.CLICK,nextClicked,false,0,true);

myPlace.load(new URLRequest(theImages[0]));

function prevClicked(event:MouseEvent):void
{
previousImage = previousImage-1;
if (previousImage<=0) {
previousImage = 3;
}
myPlace.load(new URLRequest(theImages + previousImage + “.jpg”));
previousImage --;
currentImageName=currentImageName;
}

function nextClicked(event:MouseEvent):void
{
if (currentImage>=3)
{
currentImage = 0;
}
myPlace.load(new URLRequest(theImages + currentImage + “.jpg”));
currentImage++;
currentImageName=currentImageName;
}

Thanks for any direction guys.

x lisa x