Auto Generation of Movie Clips

First. I have a movie clip that I want to duplicate it X number of times.

X is based on the size of an array.

Here is the button Code:

onClipEvent (load) {
this._x = random(500);
this._y = random(400); //These will be different but I do need to set its x,y coordinates
}
on(rollOver){
_root.btnRollOver(x);
}
on(rollOut){
_root.song_name_text.text = “”;
_root.song_description_text.text = “”;
}
on(release){
_root.btnRelease(x);
}

Function code:

for(var i = 0;i<_root.melody.length;i++){
_root.gloTemp = i;
duplicateMovieClip (_root.melody_btn, “melody_btn” + i, i); // creating the duplicate
/* INSERT */
}

btnRollOver = function(x){
_root.song_name_text.text = _root.melody[x].name;
_root.song_description_text.text = _root.melody[x].effect;
}

btnRelease = function(x){
_root.melodyAdd(x);
}

At the INSERT point, I need to generate multiple symbols of the same type but I need to enter different Data into them and be able to determine which one is calling the btnRollOver and btnRelease functions because the x is a position in the array. Each array element holds a Song. I need to display the song information in the symbol itself, and then in a viewing field (dynamic text field) when they roll over the symbol. This make sense?

I need this to be automated because the arrays are constructed from an XML file that may change length.