estoy usando un tipewrite y no puedo cambiarle el color a mi texto
el tipewrite esta compuesto de la siguiente manera.
en flash tengo las acciones:
Código :
mystring = "mi texto";
// --
var myformat:TextFormat = new TextFormat();
myformat.font = 'Book Antiqua';
myformat.size = 11;
myformat.align = 'justify';
// --
_root.createTextField("mytext", 1, 59.0, 191.7, 410, 200);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.setNewTextFormat(myformat);
// --
var tpw:Typewriter = new Typewriter(mytext, mystring, 20);
y un archivo .as
Código :
import mx.utils.Delegate;
class Typewriter {
private var interval:Number;
private var string:String;
private var speed:Number;
private var textfield:TextField;
private var index:Number;
public function Typewriter (textfield:TextField, string:String, speed:Number) {
this.textfield = textfield;
this.string = string;
this.speed = speed;
index = 0;
interval = setInterval(Delegate.create(this, exec), this.speed);
}
private function exec() {
this.textfield.text = this.string.substr(0, index);
index++;
if (index > this.string.length) {
clearInterval(interval);
}
}
}
como logro cambiar el color al texto, ya q sale en negro.
supongo q debe ser algo como: myformat.color = '#231312'; pero probe y no es asi, en q me confundo?
saludos
