UIComponent class

The UIComponent class does not represent a visual component; it contains methods, properties, and events that allow Adobe components to share some common behavior.

NOTE

 

The UIComponent class is supported only if you are working in a document that specifies ActionScript 2.0 in its Publish Settings.

All components extend UIComponent. The UIComponent class lets you do the following:

To use the methods and properties of UIComponent, you call them directly from whichever component you are using. For example, to call UIComponent.setFocus() from the RadioButton component, you would write the following code:

myRadioButton.setFocus();

You only need to create an instance of UIComponent if you are creating 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;

Related topics


Flash CS3