Dynamic text

Hi

I got this scripting from one of your guys, but how do you apply it to a button, created in flash?

 myArray = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" , "'" , " "];
word = "hello it's me again ha ha ha";
for (i=0; i<word.length; i++) {
myClip = attachMovie("mc", "mc"+i, i);
myClip.ivar = i;
myClip._y = 100;
myClip._x = 0+myClip.ivar*myClip._width;
myClip.targ = word.charAt(myClip.ivar);
myClip.myText.text = myArray[random(myArray.length)];
myClip.counter =random(10)
myClip.onEnterFrame = change;
}
function change() {
this.counter++
if (this.myText.text != this.targ && this.counter<15) {
this.myText.text = myArray[random(myArray.length)];
} else {
this.myText.text = this.targ;
delete this.onEnterFrame;
}
}