Macromedia flex 2 Manual
156
Creating Advanced Visual Components in ActionScript
■
■
■
■
■
■
■
Basic component structure
The following example shows the basic structure of a Flex component:
package myComponents
{
public class MyComponent extends UIComponent
{
....
}
}
{
public class MyComponent extends UIComponent
{
....
}
}
You must define your ActionScript custom components within a package. The package
reflects the directory location of your component within the directory structure of your
application.
reflects the directory location of your component within the directory structure of your
application.
The class definition of your component must be prefixed by the
public
keyword. A file that
contains a class definition can have one, and only one, public class definition, although it can
have additional private class definitions.
have additional private class definitions.