Groups | Blog | Home
all groups > macromedia players flash > october 2005 >

macromedia players flash : Javascript errors with Flash 8 Player


bseabrook
10/23/2005 7:38:15 PM
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>
Ned
10/28/2005 11:35:57 AM
I think it's due to Flash 8 security features. See "Macromedia Flash
Player 8 Security" white paper on MM's site.

--
-----
Ned
betabottle
11/3/2005 1:07:06 AM
Has anybody developed a workaround to this? So far the only thing I've been
able to do is go to the online Settings Manager and modify the security
settings.

And this is just for a simple command to close the pop-up window the Flash
movie sits in!

on (release) {
geturl("javascript:window.close()");
}

There has to be an easier way to use Flash Player 8 and basic commands without
having to change your settings. Oh man! Any assistance or guidance is much
appreciated!


AddThis Social Bookmark Button