Random Letter Cycling
I have tried to understand the code can someone explain this code
onClipEvent (load) {
if (_name == “main”) {
name = “DOOM”;//name to be run through and displayed
for (x=0; x<name.length; ++x) {//for var x = 0 and untill it is less than the variable nmes length, get the next alphabet
this.duplicateMovieClip(“let”+x, x);//duplicates the “main” movie
//clip and gives it name let 1 and so on
_parent[“let”+x]._x += x*15;// sets distance between moviclips
_parent[“let”+x].endLetter = name.charAt(x);//returns number of the character
//1> endLetter will hold D
}
//container where alphabets in name are checked
_root.alphabet = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ~º«ô»v«ô»º~";
_alpha = 0;// makes the “main” instancce invinscible
} else {
cycle = true;//continue to cycle
}
}
========More Help Here=======
onClipEvent (enterFrame) {
if (cycle) {
if (this.letter == endLetter) {//endLetter value is transferred to letter
++_root.count;//wha t does this do
cycle = false;
} else {
this.letter = _root.alphabet.charAt(random(_root.alphabet.length));
}
}
}
========Please explain======