Hello,

I seem to be stuck with making the buttons work when ive created and attached them.

They work but not how i want them to.

They all trace the same output when infact i want them to trace each part of the array separately.

Actionscript Code:
NewImages = new Array("backgrounds/1.jpg", "backgrounds/2.jpg", "backgrounds/3.jpg", "backgrounds/4.jpg", "backgrounds/5.jpg");
HowMany = NewImages.length;

ImageMenu.createEmptyMovieClip("NewImageMenu",1);
ImageMenu["NewImageMenu"]._x = 0;
ImageMenu["NewImageMenu"]._y = 0;
ImageMenu["NewImageMenu"].setMask(ImageMenu.AttachedMasker);

function Creation()
{
    for (j = 0; j < HowMany; j++)
    {
        ImageMenu.NewImageMenu.attachMovie("Imager","NewImageButton" + j,j,true);
        ImageMenu.NewImageMenu["NewImageButton" + j]._x = (j + 2) * (ImageMenu.NewImageMenu["NewImageButton" + j]._width + 3);
        ImageMenu.NewImageMenu["NewImageButton" + j]._y = j % 1;
        ImageMenu.NewImageMenu["NewImageButton" + j].filters = [Drop1];
        ImageMenu.NewImageMenu["NewImageButton" + j].onRelease = function()
        {
            trace(j + ". " + NewImages[i]);
            trace("Pressed");
        };
        ImageMenu.NewImageMenu["NewImageButton" + j].onRollOver = function()
        {
            this.useHandCursor = false;
        };
        ImageMenu.NewImageMenu["NewImageButton" + j].onRollOut = function()
        {//empty
        };
    }
}

Creation();

they all trace 5. backgrounds/1.jpg
Pressed when i want

1. backgrounds/1.jpg
Pressed

2. backgrounds/2.jpg
Pressed