I need to change the swf embedded n my html page, when I click on a menuItem in the same page. I do not want to navigate to a new page with another swf because that will be a bit slower. So, I need some solutions. currently I am using div in the html to include a swf file in it. my current code is given below , the javascript method showAlert will be changed later , but this is the one I want to change the SWF file right now...
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Wrapper Being Called</title>
<script type="text/javascript" src="/TestProject/flashfiles/swfobject.js"> </script>
<script type="text/javascript">
var swfVersionStr = "0";
var xiSwfUrlStr = "";
var flashvars = {};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "always";
var attributes = {};
attributes.id = "WrapperCaller";
attributes.name = "WrapperCaller";
attributes.align = "middle";
swfobject.embedSWF(
"/TestProject/flashfiles/Project1.swf", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
</script>
</head>
<SCRIPT LANGUAGE="JavaScript">
function showAlert(a) {
alert(a);
return "successful";
}
</SCRIPT>
<body>
<div id="flashContent"/>