Assign onRelease event

Hi,

I am using a private method in my class File. In this method, I am loading XML file and generating few thumbnails. Everything is going fine and running smooth. I am facing problem in assigning onRelease events to these movie clips.

for (var i:Number = 0; i<this.firstChild.childNodes.length; i++) {
duplicateMovieClip(“category_Mc”, “category_Mc”+i, _root.getNextHighestDepth());
eval(“category_Mc”+i).loadMovie(this.firstChild.childNodes*.attributes.src);
eval(“category_Mc”+i)._x = mcX;
eval(“category_Mc”+i)._y = mcY;
mcX += Number(this.firstChild.childNodes*.attributes.width)+30;
eval(“category_Mc”+i).onRelease =function(){
// some code here
}
}

I am using for loop and generating tumbnails. My only problem is, I want to assign onRelease events to these duplicated Movie Clips. I am using below code in for loop to assign onRelease:-

eval(“category_Mc”+i).onRelease =function(){
// some code here
}

So my doubt is, how to assign onRlease event to thse duplicated Move Clips.

Do you know the solution?

Thank you