This concept is a bit like the attribute in C #, of course, in order not to confuse, it is more appropriate. Because this attribute is called Attribute, the class data member is also called attribute, that is called Property.
For C # programmers, this concept will definitely be unfamiliar, and in AS2.0. This East is more simple than C #.
As a component developer, you must declare a lot of different SWC metadata tags in your component class. These tags are processed when you create a compilation clip exported to a SWC file or open the component definition panel. [Bindable] This tag indicates an attribute inside the Binding tab of the component check panel, which must define a property value before the getter / setter method. Usage 1: [Bindable ("Readonly")] USAGE 2: [Bindable (param1 = "Writeonly", Type = "DataProvider")] Usage 3: [Bindable] Note Param1 (string) Value can only take Writeonly, Readonly, Null or omitted, its default is Read and Write. Type (character String) Indicates the type of object that can be bound to this property.
[ChangeEvent] When you change the binding attribute value, ChangeEvent Metadata is performed. When the event of a metadata occurs, Flash will notify the binding of the object that is binding this property, when a getter or The attribute has changed when the setter function is called. It must be defined before a property or getter / setter method. Usage: [ChangeEvent ("click"]
[ComponentTask] A component can have one or more JSFL files associated with it to arrange a range of tasks for this component (in the developer environment). Use this tag to define this association. In the Flash Developer Environment, JSFL It can be combined with the JavaScript API. [ComponentTask [taskname, taskfile "task pop-up menu appears in the Schema (Plan) tab of the component check panel. You can activate it by the button on the right side of the dialog it.
[Event] Use the Event metadata tag to define the event that the component will broadcast. Add an Event metadata tag to the class to make the event to this class, not a member of the class. USAGE: [Event ("Click")]
[IConfile] Icon file name of the component in the library panel. Usage: [iConFile ("mycomponfile")] This file name can be any valid relative path. If you have more than one iconfile tag, the last defined one Take effect.
[Inspectable] Defines the properties displayed to the user in the component check panel. Name: Optional. Define name, default, default to the name of the attribute. Type: Optional. Definition type, lack The provision of the default is the type of attribute. Array Object List String Number Boolean Font Name Color
DefaultValue: Required. The default value of the property. Enumeration: Optional. A set of parameters separated by a comma, that is, enumeration. Verbose (Number): optional. Organizational property check panel one A string of all attributes of a particular sub-class. Listoffset: Optional. Consider the default index of a list value for the Flash MX component compatibility. Variable (string): optional. Consideration. To the Flash MX component compatibility to define the variables bound by the parameters. Category: Optional. Organizational property to the specific subtype of the attribute check
[InspectableList] You want to display item subsets in the properties panel. Sometimes some projects are inherited, you don't want to display in the properties panel. This tag allows you to control what to display, what should not be displayed, but The order of the list is not very important, and there is no practical meaning. If this tag is omitted, then all the belongings that can be checked will be displayed in the property panel.