Flash, JavaScript, and lots of Coffee.
Posted: Wed Oct 29, 2003 6:30 pm
I've been using the Flash JS functions for a while now doing stuff for IE only web apps but now I've decided to include some of the stuff on my own website I have found that Netscape doesn't like the Flash stuff.
Basically you can control Flash from JS using things like var CurrentFrame = flashmovie.CurrentFrame()...... or play a Flash movie with flashmovie.TPlay("_level0/").
NS however doesn't like the commands (which are part of Flash).
I'm just wondering if anyone knows why this is?
Here's a basic example of some code that works in IE but not in NS.
Basically you can control Flash from JS using things like var CurrentFrame = flashmovie.CurrentFrame()...... or play a Flash movie with flashmovie.TPlay("_level0/").
NS however doesn't like the commands (which are part of Flash).
I'm just wondering if anyone knows why this is?
Here's a basic example of some code that works in IE but not in NS.
Code: Select all
<head>
<script language="JavaScript">
function PlayFlashFromFrame(frame)
{
if(document.getElementById!=-1)
{
var flash = document.getElementById("flashmovie");
}
else if(document.all!=-1)
{
var flash = document.all.flashmovie;
}
else if(document.layers)
{
var flash = document.layers.flashmovie;
}
else
{
alert("Your Browser IS Rubbush");
return;
}
flash.TGotoFrame("_level5/", frame);
flash.TPlay("_level5/");
}
</script>
</head>
<body>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID="flashmovie"
WIDTH=780 HEIGHT=140>
<PARAM NAME=movie VALUE="flash.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FDF7E4> <EMBED src="flash.swf" quality=high bgcolor=#FDF7E4 WIDTH=780 HEIGHT=140 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</body>