3.1. AIR Flex/Flash Applications

AIR applications built with Flex or Flash may use ActionScript 3 as the base language for the application. The application can be built entirely with ActionScript 3 when working with either of these platforms.

Flash applications are generally built using the visual tools of the Flash development environment to create visual content. These applications are traditionally timeline-based with ActionScript 3 being used to support and extend the functionality of the visual interface.

Flex applications are usually but not always built with a combination of MXML and ActionScript 3. MXML simplifies the visual components and their layout, while ActionScript 3 adds functionality.

3.1.1. MXML

MXML is an XML-based language that was first introduced by Macromedia in 2004. MXML is a declarative tag-based markup language, and since its introduction, it has proven very successful for component layout within Flex user interface design. As an XML language it is very structured and validates against an Adobe DTD.

MXML is mostly used for component layout to design the visual aspects of a Flex or Flex-based AIR application. For example, <mx:ComboBox> adds a combo box to the display, <mx:Button> adds a button object to the display, and <mx:DataGrid> would add a data grid.

MXML can also be used to define other objects that are not visual objects. A few examples of these are <mx:WebService>, which defines a connection to a WSDL file; <mx:NumberValidator>, which is used ...

Get Beginning Adobe® AIR™: Building Applications for the Adobe Integrated Runtime now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.