Pure marker language
Module
Custom Module
creditcard>
mx: model>
Consistency, control data and MODEL consistency on the interface, no need for user writing code maintenance
Built-in verification control:
A control can be extended: custom properties, methods, events, very powerful
[Event ("Change")]]]
mx: Metadata>
Var DataObject;
Var selecteditem;
Function setValue (str: string, item: object) {
IF (DataObject == Item) Return;
IF (item == undefined) {
Visible = false;
Return;
} else {
DataObject = Item;
Visible = true;
}
}
mx: script>
mx: vbox>
Introduced CSS and SCRIPT
Dynamic Class:
In some cases, however, you might want to add and access properties or methods of a class at runtime that are not defined in the original class definition. The dynamic class modifier lets you do just that. For example, the following code adds the Dynamic Modifier To The Person Class Discussed Previously:
Dynamic class person2 {
VAR name: string;
VAR AGE: Number;
}
Now, Instances of the Person Class Can Add and Access Properties and Methods That Aren't Defined in The Original Class, AS Shown In The Following Example:
VAR A_PERSON: PERSON2 = New Person2 ();
A_PERSON.haircolor = "blue"; // no compiler error Because Class Is Dynamic
Trace (a_person.haircolor);
Subclasses of dynamic classes are also dynamic, with one exception. Subclasses of the built-in MovieClip class are not dynamic by default, even though the MovieClip class itself is dynamic. This implementation provides you with more control over subclasses of the MovieClip class, because You can choise to make your subclasses Dynamic or Not:
Class a extends movieclip {} // a is not Dynamic
Dynamic Class B Extends a {} // b IS Dynamic
Class C Extends B {} // C Is Dynamic
Class D Extends a {} // d is not Dynamic
Dynamic Class E Extends movieclip {} // e is Dynamic