StageText change displayAsPassword at Runtime
Hi there,
in my mobile app i have a login screen where the shown text input fields (which use StageText internally) should show the title of the input field per default
(e.g. "Login", "Password"). When the user clicks on such a field the title text should be cleared.
That works fine for the login input field, but for the password field the attribute displayAsPassword needs to be set to true after clearing or with the start
of the user's first character entering, and this doesn't work so far.
I tried this switch in the focusIn (no reaction) and the keyDown (only Enter Key is recognized) handler and i don't see any other suitable event handler around
that could help.
Example of the focusIn handler:
if (this.stageText.text == _defaultTitle) {
if (_passwordField == true) {
this.stageText.displayAsPassword = true;
}
this.text = this.stageText.text = "";
}
It works fine in the AIR Simulator, but not in the iOS Simulator and on the device itself.
Does someone know how i can successfully toggle from a normal to a password input field and back or
is there another solution when using StageText ?
Thanks a lot.
valley
