Letter Cycling

I am using the script from the tut in Kirupa about how to letter cycle a word.


I have it working but i am trying to create more than one word in seperate text boxes. I have changed MC names and text boxes, but it seems to only cycle in the first box. I even added dummy letters, which works but i am sure this is not the best way.

Can anyone give me a suggestion on how i would approach this problem? Thanks in advance… here is the script:

onClipEvent (load) {
if (_name == “main”) {
name = “PORTFOLIO”;
for (x=0; x<name.length; ++x) {
this.duplicateMovieClip(“let”+x, x);
_parent[“let”+x]._x += x*10;
_parent[“let”+x].endLetter = name.charAt(x);
_alpha = 0;
} else {
cycle = true;
onClipEvent (enterFrame) {
if (cycle) {
if (this.letter == endLetter) {
cycle = false;
} else {
this.letter = _root.alphabet.charAt(random(_root.alphabet.length));