File: events/LTextEvent.js
/** @language english
* <p>An object dispatches a LTextEvent object when a user enters text in a text field or clicks a hyperlink in an HTML-enabled text field. There are two types of text events: LTextEvent.TEXT_INPUT and TextEvent.WIND_COMPLETE.</p>
* @class LTextEvent
* @constructor
* @since 1.9.0
* @public
*/
var LTextEvent = function () {throw "LTextEvent cannot be instantiated";};
/** @language english
* <p>[static] Defines the value of the type property of a textInput event object.</p>
* <p>This event has the following properties:</p>
* <table>
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td>currentTarget</td><td>The object that is actively processing the Event object with an event listener.</td></tr>
* <tr><td>target</td><td>In this Event, Equivalent to currentTarget.</td></tr>
* <tr><td>eventType</td><td>The type of the event.</td></tr>
* <tr><td>keyCode</td><td>Returns the Unicode value of a non-character key in the keyboard event.</td></tr>
* <tr><td>preventDefault()</td><td>To cancel the event if it is cancelable</td></tr>
* </table>
* @property TEXT_INPUT
* @type String
* @static
* @since 1.9.0
* @example
* LInit(50, "legend", 800, 480, main);
* function main () {
* LGlobal.setDebug(true);
* var theTextField = new LTextField();
* theTextField.x = 20;
* theTextField.y = 20;
* theTextField.setType(LTextFieldType.INPUT);
* addChild(theTextField);
* theTextField.addEventListener(LTextEvent.TEXT_INPUT, textinput);
* }
* function textinput(event){
* trace("event.keyCode=" + event.keyCode);
* }
* @examplelink <p><a href="../../../api/LTextEvent/textInput.html" target="_blank">Try it »</a></p>
* @public
*/
LTextEvent.TEXT_INPUT = "textInput";
/** @language english
* <p>[static] Defines the value of the type property of a textInput event object.</p>
* <p>This event has the following properties:</p>
* <table>
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td>currentTarget</td><td>The object that is actively processing the Event object with an event listener.</td></tr>
* <tr><td>target</td><td>In this Event, Equivalent to currentTarget.</td></tr>
* </table>
* @property WIND_COMPLETE
* @type String
* @static
* @since 1.9.0
* @example
* LInit(50, "legend", 800, 480, main);
* function main () {
* LGlobal.setDebug(true);
* var theTextField = new LTextField();
* theTextField.x = 20;
* theTextField.y = 20;
* addChild(theTextField);
* theTextField.text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
* theTextField.speed = 2;
* theTextField.addEventListener(LTextEvent.WIND_COMPLETE, windComplete);
* theTextField.wind();
* }
* function windComplete(event){
* trace("windComplete","event.currentTarget = " + event.currentTarget);
* }
* @examplelink <p><a href="../../../api/LTextEvent/windComplete.html" target="_blank">Try it »</a></p>
* @public
*/
LTextEvent.WIND_COMPLETE = "windComplete";