Follow Flex After Dark on Twitter

Object Oriented MXML Components

MXML are just a different way of defining ActionScript classes. Thus, an MXML Component can also make use of ActionScript's Object Orientation.

Inheritance

Extending another component...

<mynamespace:MyComponent ...
   xmlns:mynamespace="my.package.*"
>
   ...
</mynamespace:MyCompontent>

Implements (Interfaces)

An MXML component can also declare itself as implementing one or more interfaces. The implements attribute is used for this.

<mynamespace:MyComponent ...
   implements="my.package.MyInterface"
   xmlns:mynamespace="my.package.*"
>
   ...
</mynamespace:MyCompontent>

Multiple interfaces may be listed as a comma-delimeted list.

Related Links:

Related Docs
  • Object-Oriented ActionScript ActionScript is a full-featured Object-Oriented language with support for classes, interfaces, encapsulation, polymorphism, and inheritance.
Recent Docs
Random Docs