Hi,
I have created a flash file that requires variables from the HTML page it is embedded in. Now I'm not sure wether this is a Flash problem or a HTML problem but when I view the flash file through the web page with the following embed code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>uTutorial Uploader V 1.3</title>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<center>
<p>
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="380" height="130">
<param name="movie" value="flash/arcs.swf?testing=test" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="9.0.45.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="flash/arcs.swf?testing=test" width="380" height="130">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="9.0.45.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</p>
<h6><a href="/browser.php?Do=<?php echo $_GET['Do']; ?>">Switch To Browser Uploader</a> (Older Browsers or No Flash)</h6>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</center>
</body>
</html>
The variables are not passed through to the file, however when I open /flash/arcs.swf?testing=test in its own browser window it works fine. The code in AS3 for getting the variables is
function getqry(myEvent:Event)
{
var myQueryStrings=this.loaderInfo.parameters;
status_txt.text=myQueryStrings.testing;
}
this.loaderInfo.addEventListener(Event.COMPLETE, getqry);
Regards,
Sam Rudge