masked password in textArea with flash actionscript

Posted by Vineela | Flash, as3, utils | Friday 5 December 2008 5:05 am
import fl.controls.CheckBox;
import fl.controls.TextArea;

var cB:CheckBox = new CheckBox();
cB.label = "Display as Password";
cB.addEventListener(Event.CHANGE, cB_password);
cB.width = 200;
cB.move(10, 5);
addChild(cB);

var tA:TextArea = new TextArea();
tA.displayAsPassword = false;
tA.width = 125;
tA.move(15, 40);
addChild(tA);

function cB_password(evt:Event):void {
    tA.displayAsPassword = cB.selected;
}