MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 797

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Example
The following code disables a Button component,
component,
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.focusOut
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
on(focusOut){
...
}
listenerObject = new Object();
listenerObject.focusOut = function(eventObject){
...
}
componentInstance.addEventListener("focusOut", listenerObject)
Description
Event; notifies listeners that the object has lost keyboard focus.
The first usage example uses an
component instance.
, and enables the button when the user click on it:
handler and must be attached directly to a
on()
, while a user types in the TextInput
btn
,
UIComponent.focusOut
UIComponent class
797

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents