Packagesekati.text
Classpublic class FocusToggleField
InheritanceFocusToggleField Inheritance flash.text.TextField

FocusToggleField provides a togglable input TextField created in created in code (versus the IDE).

Warning: Your TextField or DisplayObject containing the TextField must be added to stage before the FocusToggle is instantiated for proper functionality.


Example
   var t : FocusToggleField = new FocusToggleField( );
   t.text = "Hello World!";
   t.x = 50;
   t.y = 50;
   t.width = 500;
   t.height = 100;
   t.background = true;
   t.backgroundColor = 0xffffff;
   t.border = true;
   t.borderColor = 0x999999;
   addChild( t );
  

See also

sekati.text.FocusToggleSprite


Public Properties
 PropertyDefined by
  focus : Boolean
[read-only] Boolean value which determines whether the TextField is focused or not.
FocusToggleField
  text : String
[write-only] Set the default text on the TextField & store it as the last defaultValue.
FocusToggleField
  type : String
[write-only] Disallow any but TextFieldType.INPUT as type.
FocusToggleField
Protected Properties
 PropertyDefined by
  _defaultValue : String
FocusToggleField
Public Methods
 MethodDefined by
  
FocusToggleField Constructor
FocusToggleField
Protected Methods
 MethodDefined by
  
focusHandler(e:Event):void
Handle the focus event.
FocusToggleField
  
inputHandler(e:TextEvent):void
Handle the input event: store the default value including the latest character contained in the event.
FocusToggleField
Property detail
_defaultValueproperty
protected var _defaultValue:String
focusproperty 
focus:Boolean  [read-only]

Boolean value which determines whether the TextField is focused or not.

Implementation
    public function get focus():Boolean
textproperty 
text:String  [write-only]

Set the default text on the TextField & store it as the last defaultValue.

Implementation
    public function set text(value:String):void
typeproperty 
type:String  [write-only]

Disallow any but TextFieldType.INPUT as type.

Implementation
    public function set type(value:String):void
Constructor detail
FocusToggleField()constructor
public function FocusToggleField()

FocusToggleField Constructor

Method detail
focusHandler()method
protected function focusHandler(e:Event):void

Handle the focus event.

Parameters
e:Event
inputHandler()method 
protected function inputHandler(e:TextEvent):void

Handle the input event: store the default value including the latest character contained in the event.

Parameters
e:TextEvent