Using the <mxml> tag

You use the <mxml> JSP tag to write Flex applications inside a JSP. This tag supports adding MXML content in the JSP itself, or refers to external MXML files that Flex compiles and embeds in the JSP. The syntax for the <mxml> tag is as follows:

<prefix:mxml [source=source_file] [properties]>
   [MXML]
</prefix:mxml>

The <mxml> tag creates the <object> and <embed> tags that act as an HTML wrapper for the Flex application. This wrapper is the same as the wrapper generated when you request a *.mxml file.

You can define attributes of the <mxml> tag that become properties of the <object> and <embed> tags in the HTML wrapper. These properties define how the SWF file appears and interacts with the web page. For information about using the <mxml> tag to define the values in the HTML wrapper, see About the <object> and <embed> tags.

The <mxml> tag has optional child tags: <param> and <flashvar>. You use the <param> tag to pass predefined variables to Flash Player. You use the <flashvar> tag to pass user-defined variables. For more information, see Using the <param> tag and Using the <flashvar> tag.

The following sections describe how to use the <mxml> JSP tag to write MXML directly in a JSP and how to use it to refer to an external MXML document.


Version 1.5

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00000852.htm