由于它扩展了Textfield类,您应该能够更改textColor等属性。
RC told you to do something like this.
var tf:TextField = new TextField();
tf.text = "Super Long Message Goes Here ";
tf.textColor = 0xFF0000; // <----------------------------------
tf.x = tf.y = 300;
addChild(tf);
var t:Timer = new Timer(200);
t.addEventListener(
TimerEvent.TIMER,
function(ev:TimerEvent): void
{
tf.text = tf.text.substr(1) + tf.text.charAt(0);
}
);
t.start();
or this:
var tf:MarqueeTextField = new MarqueeTextField();
tf.text = "Super Long Message Goes Here ";
tf.textColor = 0xFF0000; // <------------------------
tf.x = tf.y = 300;
tf.marquee(200);
addChild(tf);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.