     private static const DELETE_BEFORE:uint = 2;
     private static const DELETE_AFTER:uint = 3;
 
+    /**
+     * Create an instance of a new MobilePasswordField.
+     * 
+     * @param  textField  The TextField to listen to and control. This instance
+     *                    must have exclusive control over this object.
+     */
     public function MobilePasswordField(textField:TextField)
     {
         super();
         this.textField = textField;
         endInternalEdit();
         textField.text = _text = ""; 
+    }
+
+    /**
+     * The text stored in the target TextField. Reading the text property
+     * from the TextField directly will return the current visible content of
+     * the TextField - i.e. mask characters with a possible single input
+     * character. 
+     */
+    public function get text():String
+    {
+        return _text;
+    }
+
+    public function set text(new_text:String):void
+    {
+        if (new_text != _text)
+        {
+            _text = new_text;
+            hideAllCharacters();
+            dispatchEvent(new Event(Event.CHANGE));
+        }
     }
 
     private function onFieldKeyUp(event:KeyboardEvent):void

    {
        selectionStart = textField.selectionBeginIndex;
        selectionEnd = textField.selectionEndIndex;
    }

    public function get text():String
    {
        return _text;
    }

    public function set text(new_text:String):void
    {
        if (new_text != _text)
        {
            _text = new_text;
            hideAllCharacters();
            dispatchEvent(new Event(Event.CHANGE));
        }
    }

    private function endInternalEdit():void


    private function onFieldChange(event:Event):void
    {
        if (action == INSERT)
        {
            _text = StringUtil.splice(_text, selectionStart, selectionEnd, insertedText);
        }
        else if (textField.length < _text.length)
        {
            // deletion has happened
            if (selectionStart == selectionEnd)
            {
                // there was no selection, so we need to look at the value we
                // stored in response to the keyCode to see what to do
                if (action == DELETE_AFTER)
                {
                    _text = StringUtil.splice(_text, selectionStart, selectionStart + 1, "");
