By default, IE visitors have to click twice on an embedded Flash object to click on links within the Flash object. The first click "activates" the Flash object and the second click actually opens the link within the Flash object.
You can fix this problem with a javascript trick though…
- Create an insert_flash.js file on your web server that looks like…
function insertFlash(ih, parent){ if(document.all) { document.all[id].innerHTML=ih; } else { document.getElementById(parent).innerHTML=ih; }}
<div id='my_flash' style='width: 740; height: 80'> <script type='text/javascript' language='JavaScript1.2' src='/insert_flash.js'></script><script type='text/javascript' language='JavaScript1.2'><!-- ih=''; ih+='<OBJECT classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\''; ih+=' codebase=\'http://download.macromedia.com/pub/shockwave/''; ih+='cabs/flash/swflash.cab#version=6,0,0,0\''; ih+=' WIDTH=\'740\' HEIGHT=\'80\' tagID=\'FC_2_3_Column3D\'>'; ih+='<PARAM NAME=movie VALUE=\'/xyz.swf\'>'; ih+='<PARAM NAME=quality VALUE=high>'; ih+='<PARAM NAME=bgcolor VALUE=#FFFFFF>'; ih+='<PARAM NAME=wmode VALUE=transparent>'; ih+='<EMBED wmode=transparent src=\'/xyz.swf\''; ih+=' quality=high bgcolor=#FFFFFF WIDTH=\'740\' HEIGHT=\'80\' NAME=\'xyz\''; ih+=' TYPE=\'application/x-shockwave-flash\''; ih+=' PLUGINSPAGE=\'http://www.macromedia.com/go/getflashplayer\'><' + '/EMBED>'; ih+='<' + '/OBJECT>'; insertFlash(ih, 'my_flash');--></script></div>
Is this an ugly fix? Yes, it is awkward using javascript to insert the flash.
Does it fix the problem? Yes, IE visitors will only need one click to select something within your flash object.
Instead of creating a separate javascript file, can I just embed the contents of insert_flash.js javascript in the page? No, that doesn’t seem to work then — you have to have the insert_flash.js javascript in a separate file.