EventTextField

Kind of class:class
Inherits from:DispatchableTextField < CoreTextField < CoreMovieClip < MovieClip
Version:06/21/07
Author:Aaron Clinger
Classpath:org.casaframework.textfield.EventTextField
File last modified:Sunday, 19 August 2007, 13:43:28
Dispatches TextField event handler notification using org.casaframework.event.EventDispatcher.
Example:
function onTextChanged(sender:EventTextField):Void {
    trace("Text has changed to: " + sender.text);
}

var myText_mc:EventTextField = EventTextField.create(this, "text_mc", null, 250, 50);
this.myText_mc.border = this.myText_mc.background = true;
this.myText_mc.type = "input";
this.myText_mc.text = "Hello World!";
this.myText_mc.addEventObserver(this, EventTextField.EVENT_CHANGED, "onTextChanged");
See also:
Events broadcast to listeners:
onChanged = function (sender:EventTextField) {}
onKillFocus = function (sender:EventTextField, newFocus:Object) {}
onScroller = function (sender:EventTextField) {}
onSetFocus = function (sender:EventTextField, oldFocus:Object) {}

Class properties

EVENT_CHANGED

static EVENT_CHANGED:String = 'onChanged'(read,write)

EVENT_KILL_FOCUS

static EVENT_KILL_FOCUS:String = 'onKillFocus'(read,write)

EVENT_SCROLLER

static EVENT_SCROLLER:String = 'onScroller'(read,write)

EVENT_SET_FOCUS

static EVENT_SET_FOCUS:String = 'onSetFocus'(read,write)

Class methods

create

static function create (target:MovieClip, instanceName:String, depth:Number, width:Number, height:Number) : EventTextField
Creates an empty instance of the EventTextField class. Use this instead of a traditional new constructor statement due to limitations of ActionScript 2.0.
Parameters:
target :
Location where the TextField should be attached.
instanceName:
A unique instance name for the TextField.
depth :
[optional] The depth level where the TextField is placed; defaults to next highest open depth.
width :
A positive integer that specifies the width of the new text field.
height :
A positive integer that specifies the height of the new text field.
Returns:
Returns a reference to the created instance.
Example:
var myText_mc:EventTextField = EventTextField.create(this, "text_mc", null, 250, 50);
Since:
Flash Player 7