After installing Flash Player 8, my javascript commands via the embedded SWF
stopped working. A standard HTML link does continue to work, so I know it's a
problem with the SWF code. I re-installed version 6 of the player and it
worked again -- so it's definitely an issue with Player 8.
Does anyone know how I can tweak the code in the Flash file? Or is this a
major glitch with the Plugin?
Here is the code in the Flash button (top level of movie):
on (release) {
getURL("javascript:NewWindow('
http://www.yahoo.com','test',780,490,'no')");
}
Here is the HTML 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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script language="JavaScript">
var win= null;
function NewWindow(mypage,myname,w,h,scroll) {
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes';
win=window.open(mypage,myname,settings).focus();
}
</script>
</head>
<body bgcolor="#ffffff">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab# version=6,0,0,0" width="400" height="300" id="myFlash" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="test.swf" quality="high" bgcolor="#ffffff" width="400"
height="300" name="test" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="
http://www.macromedia.com/go/getflashplayer" name="myFlash"
swLiveConnect="true"/>
</object>
</p>
<p><a
href="javascript:NewWindow('
http://www.yahoo.com','test',780,490,'no');">link
test</a></p>
</body>
</html>