_root.myPhrases = new Array();
myPhrases[0] = "To hell and back";
myPhrases[1] = "There is no God but Allah";
myPhrases[2] = "There's the rub";
myPhrases[3] = "Tank the game, rules";
myPhrases[4] = "God, this sucks";
}
makePhrases();
function generateRandomPhrase():Number {
var phraseToUse = Math.floor(Math.random()*myPhrases.length);
return phraseToUse;
}
var myPhraseToUse = generateRandomPhrase();
trace(myPhraseToUse);
function makeBoxes():Void {
var letterSpotX:Number = 25;
var letterSpotY:Number = 100;
for (var i:Number = 0; i
_root.attachMovie("letterMC", "letter_"+i, i, {_x:letterSpotX, _y:letterSpotY});
_root["letter_"+i].letterBox.text = myPhrases[myPhraseToUse].charAt(i);
letterSpotX += 25;
}
}
makeBoxes();
No comments:
Post a Comment