What is Wrapper?
The HTML page and JavaScript file are known as the wrapper.
Types of Wrapper?
■custom wrapper
■ Export and customize an HTML wrapper from Flex Builder
■ Generate the HTML wrapper with Flex Data Services.
You can write your own wrapper for your SWF files rather than use the wrapper generated byFlex Builder or Flex Data Services. Your own wrapper can be simple HTML, or it can be aJavaServer Page (JSP), a ColdFusion page, an Active Server Page (ASP), or anything that canreturn HTML that is rendered in your client’s browser. Typically, you integrate wrapper logicinto your website’s HTML templates.
Writing Our Own Wrapper !
The basic wrapper consists of the following:
■ HTML page. This is the file that the client browser requests. It typically defines two
possible experiences (one for users with JavaScript enabled and one for users without
JavaScript enabled). This page also references a separate JavaScript file.
In the provided HTML templates, this file is named index.template.html.
■ JavaScript file. The JavaScript file referenced by the <script> tag in the HTML page
includes the following:
<object> tag This tag embeds the SWF file for Internet Explorer.
<embed> tag This tag embeds the SWF file for Netscape-based browsers.
In the provided HTML templates, the JavaScript file is named AS_OETags.js.
<!– index.html –>
<html>
<body>
<script src=”mysource.js” mce_src=”mysource.js”></script>
<noscript>
<object id=’MyApp’ classid=’clsid:D27CDB6E-AE6D-
11cf-96B8-444553540000′ codebase=’http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0′
height=’100%’ width=’100%’>
<param name=’src’ value=’MyApp.swf’/>
<embed name=’MultipleButtons’ pluginspage=’http://
www.macromedia.com/shockwave/download/index.cgi
?P1_Prod_Version=ShockwaveFlash’ src=’MyApp.swf’ height=’100%’
width=’100%’/>
</object>
</noscript>
</body>
</html>
Leave a Comment
No comments yet.
Comments RSS TrackBack Identifier URI
