Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

17. Modules and Runtime Shared Libraries > 17.4. Create a MXML-Based Module

17.4. Create a MXML-Based Module

Problem

You want to create a MXML-based module to be loaded by an application at runtime.

Solution

Create a MXML class that extends the mx.modules.Module class by using the <mx:Module> root tag, and compile the module using the mxmlc command-line tool.

Discussion

A module is similar to an application and is compiled by using the mxmlc utility to generate a SWF file that can be loaded into an application or another module at runtime. To create a MXML-based module, you extend the mx.modules.Module class by using <mx:Module> as the root tag of the MXML file.

The following example is a module that displays a list of contacts within a data grid:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint