Setting proporties to externally loaded images turned buttons

Hello there,

I hope this is an easy AS2 -> AS3 question. I’ve been searching all around but cannot find the answer to this. I think it should be simple. I’m externally loading a bunch of images into this cool iTunes-esque thing I built but when I click the button, I need some indication in the function of what image I clicked!! For example:


//AS2 - not real code, just putting this here so you know what I'm trying to do
images = ['image1.png','image2.png','image3.png'];
locations = ['dog.html','cat.html','fish.html'];
for(i=0;i<images.length;i++){
     this.createEmptyMovieClip("clips"+i,i);
     this["clips"+i]._x = 100*i;
     this["clips"+i]._y = 20;
     this["clips"+i].secretIdentifier = i;
     this["clips"+i].onRelease = function(){
          getURL(locations[this.secretIdentifier]);
     }
}

So you can see here that I saved what the i was when looping through and creating the buttons - used this a million times in AS2. But now I need to find the AS3 equiv and **this **is _root. Which _root is gone. This is actually just root1 - very confusing…
I cannot dumb down the AS3 code as I don’t understand it too well, but here’s a breakdown of what I’m doing


//AS3
//**images **is still my image array loaded in using Loader class.. that works; miracle
//all the images were given a name and are children of the "container"
for(var i:uint = 0; i<images.length; i++){
     var _blt:MovieClip = MovieClip(container.getChildByName("clips"+i));
     _blt.addEventListener(MouseEvent.MOUSE_DOWN, buttonclicker);
}
public function buttonclicker(event:MouseEvent):void
{
     trace("button was just clicked - this works!!");
     //right here - how can I know what button was clicked?
     //this.name returns "root1"
     //makes me sad.
}

Whew, probably quickly answered by someone who made the change to AS3 when they were supposed to. I just needed a png encoder or else I would’ve just used AS2 and been done by now. Boo. Thanks!!