Trasnlate AS2 to AS3

Hey, i have this code:

copy = new Array("", “clicked button 1”, “clicked button 2”);

var btnNum = 2;

for (i=1; i<=btnNum; i++) {
this[“btn”+i].onRelease = function() {
id = this._name;
setStatus(id);
};
}

function setStatus(statement) {
id = id.substr(3, 1);
statusTxt.text = copy[id];
}

it’s in AS2. How do i translate, or do the same thing, in AS3. And then use it to load in images dynamically that are in the array? So if someone can help me out that would be sweeeeet.