Código PHP:
var my_fmt:TextFormat = new TextFormat();
//my_fmt.color = 0xCC00FF;
my_fmt.font = 'Verdana';
my_fmt.size = 12;
this.createTextField("one_txt", 1, 0, 0, 100, 22);
this.createTextField("two_txt", 2, 0, 25, 100, 22);
this.createTextField("three_txt", 3, 0, 50, 100, 22);
this.createTextField("four_txt", 4, 0, 75, 100, 22);
for (var i in this) {
if (this[i] instanceof TextField) {
this[i].border = true;
this[i].type = "input";
}
}
this.createTextField("status_txt", this.getNextHighestDepth(), 200, 10, 300, 100);
status_txt.html = true;
status_txt.multiline = true;
var someListener:Object = new Object();
someListener.onSetFocus = function(oldFocus, newFocus) {
status_txt.htmlText = "<b>setFocus triggered</b>";
status_txt.htmlText += "<textformat tabStops='[20,80]'>";
status_txt.htmlText += " \toldFocus:\t"+oldFocus;
status_txt.htmlText += " \tnewFocus:\t"+newFocus;
status_txt.htmlText += " \tgetFocus:\t"+Selection.getFocus();
status_txt.htmlText += "</textformat>";
//
newFocus.setTextFormat(my_fmt);
};
Selection.addListener(someListener);