I’d like to reuse this old code, but need to have it rewritten for the main timeline. I can’t seem to get it right. Anyone else? You need to create a textfield and give it the variable name of “letter” (No instance name is needed). Then convert the textfield to a movieclip named “my_mc” and drag that onto the stage. Place the following code on it:
onClipEvent (load) {
if (_name == "my_mc") {
name = "BUSHANDCHENEY";
for (x=0; x<name.length; ++x) {
this.duplicateMovieClip("let"+x, x);
_parent["let"+x]._x += x*15;
_parent["let"+x].endLetter = name.charAt(x);
}
_root.alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
_alpha = 0;
} else {
cycle = true;
}
}
onClipEvent (enterFrame) {
if (cycle) {
if (this.letter == endLetter) {
++_root.count;
cycle = false;
} else {
this.letter = _root.alphabet.charAt(random(_root.alphabet.length));
}
}
}
Thanks for any help.