
27ADOBE FLEX 3
Creating and Extending Adobe Flex 3 Components
this.isEnabled = isEnabled;
}
// Define static constant.
public static const ENABLE_CHANGED:String = "enableChanged";
// Define a public variable to hold the state of the enable property.
public var isEnabled:Boolean;
// Override the inherited clone() method.
override public function clone():Event {
return new EnableChangeEvent(type, isEnabled);
}
}
}
In this example, your custom class defines a public constructor that takes two arguments:
• A String value that contains the value of the type property of the Event object.
• An optional Boolean value that contains the state of the component ...