copia y pega....
Flash MX 2004
Código:
MovieClip.prototype.search = function(letter, ran) {
var pointer:Number = 32;
this.onEnterFrame = function() {
tLetter = (ran) ? random(91)+31 : pointer;
if (letter != String.fromCharCode(tLetter)) {
this.label_txt.text = String.fromCharCode(tLetter);
} else {
this.label_txt.text = String.fromCharCode(tLetter);
this.label_txt.setTextFormat(red);
delete this.onEnterFrame;
}
pointer++;
};
};
var texto:String = "Tmeister 2005 =)";
var basex:Number = 100;
var basey:Number = 100;
var red:TextFormat = new TextFormat();
red.color = 0x990000;
for (var a = 0; a<texto.length; a++) {
var clip_mc:MovieClip = createEmptyMovieClip("x"+a, a);
clip_mc.createTextField("label_txt", 1, 0, 0, 0, 0);
clip_mc.label_txt.text = texto.substr(a, 1);
clip_mc.label_txt.autoSize = true;
clip_mc._x = basex;
clip_mc._y = basey;
basex += clip_mc._width-2;
//clip_mc.search(texto.substr(a, 1), false);
clip_mc.search(texto.substr(a, 1), true);
}
Pueden usarlo asi
clip_mc.search(texto.substr(a, 1), false);
ó
clip_mc.search(texto.substr(a, 1), true);
ustedes veran cual es la diferencia...
Saludos!!