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
  • MXML Anatomy The anatomy of an MXML component file.
  • Flex Events Events drive Flex applications. See how to register listeners and dispatch events.
  • Flex DataGrid The Flex DataGrid control is used for displaying tabular data.
  • Subversion Introdution Introduction to Subversion, the source-control system.
  • Flex StyleSheets StyleSheets define styles for Flex components and can be defined inline or loaded at run-time.