UIComponent class
The UIComponent class does not represent a visual component; it contains methods, properties,
and events that allow Macromedia components to share some common behavior. All version 2
components extend UIComponent. The UIComponent class lets you do the following:
•
Receive focus and keyboard input
•
Enable and disable components
•
Resize by layout
To use the methods and properties of UIComponent, you call them directly from whichever
component you are using. For example, to call
component, you would write the following code:
myRadioButton.setFocus();
You only need to create an instance of UIComponent if you are using version 2 of the
Macromedia Component Architecture to create a new component. Even in that case,
UIComponent is often created implicitly by other subclasses such as Button. If you do need to
create an instance of UIComponent, use the following code:
class MyComponent extends mx.core.UIComponent;
UIComponent class (API)
Inheritance
MovieClip >
ActionScript Class Name
The methods, properties, and events of the UIComponent class allow you to control the common
behavior of Flash visual components.
Method summary for the UIComponent class
The following table lists methods of the UIComponent class.
Method
UIComponent.getFocus()
UIComponent.setFocus()
Methods inherited from the UIObject class
The following table lists the methods the UIComponent class inherits from the UIObject class.
When calling these methods from the UIComponent object, use the form
UIComponentInstance.methodName
Method
UIObject.createClassObject()
UIObject.createObject()
UIObject.destroyObject()
UIComponent.setFocus()
UIObject class
> UIComponent
mx.core.UIComponent
Description
Returns a reference to the object that has focus.
Sets focus to the component instance.
.
Description
Creates an object on the specified class.
Creates a subobject on an object.
Destroys a component instance.
CHAPTER 6
Components Dictionary
from the RadioButton
UIComponent class
793
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?