MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1350

Components language reference
Table of Contents

Advertisement

Example
The following code disables a Button component,
component,
, and enables the button when the user clicks it:
txt
var txt:mx.controls.TextInput;
var btn:mx.controls.Button;
var txtListener:Object = new Object();
txtListener.focusOut = function() {
_root.btn.enabled = true;
}
txt.addEventListener("focusOut", txtListener);
var txtListener2:Object = new Object();
txtListener2.focusIn = function() {
_root.btn.enabled = false;
}
txt.addEventListener("focusIn", txtListener2);
See also
EventDispatcher.addEventListener()
UIComponent.getFocus()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
componentInstance.getFocus();
Parameters
None.
Returns
A reference to the object that currently has focus.
Description
Method; returns a reference to the object that has keyboard focus.
1346
UIComponent class
, while a user types the TextInput
btn
,
UIComponent.focusIn

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents