
CHAPTER 2
16
import mx.controls.Button;
// Import all classes in the mx.events package
import mx.events.*;
// Class definition goes here.
public class MyButton extends Button {
// Define properties, constructor, and methods.
}
}
The class definition of your component must be prefixed by the public keyword, or it cannot be used as an
MXML tag. A file that contains a class definition can have one, and only one, public class definition, although it
can have additional internal class definitions. Place any internal class definitions at the bottom of your source file
below the closing curly brace of the package definition.
In a single ActionScript file, you ...