Код AS1/AS2:
var requestText:TextField = fon.createTextField("requestText", fon.getNextHighestDepth(), 0, 0, fon._width * 2 / 3, 18);
requestText.type = "input"
requestText.border = true;
requestText.borderColor = 0x777777;
requestText.background = true;
requestText.backgroundColor = 0xFFFFFF;
requestText.maxChars = 50;
var requestFmt:TextFormat = new TextFormat();
requestFmt.color = 0x999999;
requestFmt.size = 18;
requestFmt.font = "Trebuchet MS";
requestText.setTextFormat(requestFmt);
requestText._x = (fon._width - listWidth) / 2;//(fon._width - requestText._width) / 2;
requestText._y = fon._height - requestText._height * 2;
Selection.setFocus(requestText);
День добрый, программно делаю инпут текст филд и пытаюсь ему присвоить фокус, но что то не то, вроде бы все на месте. но не работает. Само поле трейсится хорошо.
З.Ы. пробовал и так:
Код AS1/AS2:
var txt:TextField = this.createTextField ("txt", this.getNextHighestDepth (), 10, 10, 100, 20);
txt.type = "input";
txt.border = true;
Selection.setFocus(txt);
тоже ничего и под 9ый и 10ый плееры — 0, юзаю кс4, проверить под кс3 возможности нету. Может опять в нем дело?