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
  • Flex Collections Collections are objects that provide a uniform way to access and represent item lists.
  • Flex Fonts Working with Fonts in Flex, including embedding and runtime loading.
  • Flex HTTP Service Flex provides an HTTP Service in its RPC (Remoting) package for standard HTTP operations.
  • Flex Libraries A Library is collection of Flex/ActionScript classes and resources compiled to a .swc file.
  • Flex Binding Flex Data Binding enables objects and their values to be bound together so that when a source changes a target automatically gets updated.