In this lesson, you create an HTML wrapper that embeds the Flex
application-under-test with the .swf extension.
The HTML wrapper references the SWF file. The HTML wrapper consists
of an object tag and an embed tag that
formats the SWF file on the page, and defines data object locations.
To
create an HTML wrapper:
- Open any text editor.
- Type the following code.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="myapp" width="100%" height="100%"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
<param name="movie" value="Test.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value=#CCCCCC />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="Test.swf" quality="high" bgcolor=#CCCCCC
width="1000" height="500" name="myapp" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
- Save the file as Test.html.
Pass the Test.html to the tester to test the HTML page that contains
the embedded Test.swf using Functional Tester.