External Interface, Internet Explorer and Time Wasted
By Sal Uryasev
April 15, 2010
Find more about:
Dear Googlers,
I leave this message for you in the case that you encounter a similar obstacle to your productivity. Internet Explorers 6, 7 and 8 do not like uppercase letters (or hyphens) in the object ID when embedding a swf into the page if you then plan on using the code with ExternalInterface. They do not like it with SWFObject or with the simple old fashioned object tag. The solution was elusive, but there is some help on the ghettocooler.net Treasure Trove.
The following code will work in Firefox and Safari, but will mysteriously have a problem in Internet Explorer:
<script language="javascript">
function submitLemon() {
var swf = document.getElementById("myContent");
swf.iCanHasParameter('lemon');
}
swfobject.embedSWF("movie.swf", "myContent", "800",
"100%", "9.0.124", null, {}, {bgcolor: '#ffffff'});
</script>
It will however work if you replace the upper case letter with its lowercase equivalent:
<script language="javascript">
function submitLemon() {
var swf = document.getElementById("mycontent");
swf.iCanHasParameter('lemon');
}
swfobject.embedSWF("movie.swf", "mycontent", "800",
"100%", "9.0.124", null, {}, {bgcolor: '#ffffff'});
</script>





1 comment
me said:
http://labs.hellokeita.com/2007/10/16/swfobject-externalinterface-bug-on-ie/
I have not tried this. Here is another solution, http://www.cristalab.com/tips/como-comunicar-flash-y-javascript-en-actionscript-3-c50326l/
said:
Add a comment