You use the <flash> tag to include pregenerated SWF files in your JSPs. The <flash> tag generates the HTML wrapper that defines the application on the page. You can set tag attributes on the <flash> tag that Flex converts to properties that define the appearance and interaction of the SWF file on the page.
To use the <flash> tag, you must first generate the SWF file by requesting it with Macromedia Flash Player or browser, or the mxmlc precompiler.
The syntax of the <flash> tag is as follows:
<prefix:flash source=source.swf [attributes] />
For example:
<%@ taglib uri="FlexTagLib" prefix="mm" %> <mm:flash source="myApp.swf" border="5" />
The <flash> tag creates the <object> and <embed> tags that act as an HTML wrapper for the Flex application and adds them to the resulting HTML output stream.
The <flash> 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.
You can define attributes of the <flash> 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 on using the <flash> tag to define the values in the HTML wrapper, see About the <object> and <embed> tags. You can also define these properties using the <param> tag.
When you use the <flash> JSP tag, Flex generates a new HTML wrapper every time the JSP is requested. There is no noticeable performance penalty for regenerating this wrapper, however, because the underlying SWF file is not recompiled. After the JSP page is generated, it is probably cached by your JSP engine as a servlet, as any JSP page would be cached. For more information, see your application server's documentation.
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/00000856.htm