[Javascript] RE: Eolas IE ships and a possible work-around
Geoff Knutzen
geoffreyk at seanet.com
Fri Mar 3 12:11:08 CST 2006
_____
From: Geoff Knutzen [mailto:gknutzen at farecast.com]
Sent: Friday, March 03, 2006 7:59 AM
To: 'javascript at LaTech.edu'
Subject: Eolas IE ships and a possible work-around
Looks like Microsoft has shipped the version of IE that will not properly
interact with flash (and other external multi-media players)
http://www.pcmag.com/article2/0,1895,1932738,00.asp
microsoft's page
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ove
rview/activating_activex.asp
I have been working on a solution for my site this morning and have come up
with the following code. I was wondering if there are any opinions on this
technique and whether it really works on most browser/platform combinations.
I added the following function to an external .js file that is called by my
pages that have flash on them.
function writeExCtrl(id){
if(document.getElementById && document.getElementById(id) &&
document.getElementById(id).innerHTML){
document.write(document.getElementById(id).innerHTML.replace(/>/gi,
'>').replace(/</gi, '<'));
}
}
Then I wrapped my existing object and embed tags with these lines
<noscript id="flash1">
Call to flash here
</noscript><script type="text/javascript">writeExCtrl('flash1')</script>
So that it looks like this
<noscript id="flash1">
<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="450" height="12" id="yourID" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="yourMovie.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent">
<param name="bgcolor" value="#eeeeee" />
<param name="FlashVars" VALUE="x=bob&y=jim"/>
<embed src="yourMovie.swf" FlashVars="x=bob&y=jim" quality="high"
bgcolor="#eeeeee" width="450" height="12" wmode="transparent"
name="yourName" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript><script type="text/javascript">writeExCtrl('flash1')</script>
I like this because I don't have to change anything in the code that I use
to embed the flash files. This is nice because some of the code is generated
on the fly.
It seems to work fine on all of the browsers that I have tried it on, but I
would appreciate any other eyes on this.
Also, are there any ways to make this better/faster/smaller?
Just looking for feedback on this
TIA
-Geoffrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060303/7b116412/attachment.htm>
More information about the Javascript
mailing list