
Код AS1/AS2:
this.defaultPassText = "Пароль";
this.input_pass.text = this.defaultPassText;
this.onSetFocus = function(oldFocus, newFocus) {
if (newFocus == this.input_pass && this.clearPass != true) {
this.input_pass.password = true;
this.clearPass = true;
newFocus.text = "";
var f = this.input_pass.filters[0];
f.strength = 0;
this.input_pass.filters = [f];
}
if (oldFocus == this.input_pass && (this.input_pass.text).split(" ").join("") == "") {
this.input_pass.text = this.defaultPassText;
this.clearPass = false;
this.input_pass.password = false;
var f = this.input_pass.filters[0];
f.strength = 1;
this.input_pass.filters = [f];
}
};
Selection.addListener(this);
На сцене должно быть поле вводимого текста "input_pass", с фильтром тени.
Вы специально пишите с ошибками, или просто их не замечаете?