Andrick Borderguard & Ketchup Co.
code.junkie: flash/ie fix
 [ The Internet Explorer/ActiveX Control Hack ]

Sucks to lose a half billion dollar patent suit, doesn't it?

Again, there are a thousand versions of this out there but I'm a real fan of this one. Simple, direct, easy -- and it seems to do the job and keep Flash from getting that 'Click Here to Activate' crap. I don't remember where I got it originally [if memory serves, it might have been Apple, and modified to work for Flash rather than QuickTime] but it works swell.

As long as you remember one little trick: Put this into a separate .js file.

Obviously, you'll want to adjust variables as appropriate. If anyone's interested, I think I see a fairly easy way to do this as a PHP include so it'll be a one-shot.

the code:
Swap your variables as necessary, and put this into a .js file in your includes directory -- one per Flash piece.
function flashWrite() {
	document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
	http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab
	#version=8,0,0,0" width="870" height="150" id="abk4_nav align="middle">');
	document.write ('<param name="allowScriptAccess" value="sameDomain" />');
	document.write ('<param name="movie" value="flash/abk4_nav.swf" />');
	document.write ('<param name="quality" value="high" />');
	document.write ('<param name="bgcolor" value="#ffffff" />');
	document.write ('<param name="wmode" value="transparent" />');
	document.write ('<embed src="flash/abk4_nav.swf" quality="high" bgcolor="#ffffff" 
	wmode="transparent" width="870" height="150" name="abk4_nav" align="middle" 
	allowScriptAccess="sameDomain" type="application/x-shockwave-flash" 
	pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write ('<\/object>');
}

flashWrite();


The call on the page looks like this:
<script src="inc/flashWrite.js" type="text/javascript" language="JavaScript"></script>
considerations
  • Did I mention to put it into a separate .js file?
  • Remember to adjust the variables in both the object and embed tags -- else it won't work in one browser or the other.
Home About: T.E.D. Andrick About: Our Philosphy About: The Name Portfolio: Web Design Portfolio: Template Design Portfolio: Identity Design Portfolio: Print Design Clients/Projects: Client List Clients/Projects: Projects List Clients/Projects: Special Projects More: Filter.Junkie Thin Chrome Gold Text Infamous MacOS 'Gel' Buttons More: Code.Junkie YoungPup's dropdown menus The IE6 PNG display hack A really simple JavaScript image button rollover A not-simple CSS image button rollover Sliding DIVs Fading DIVs The IE/ActiveX Control hack Flash and JavaScript variables Flash & XML text marquee The gerenic emailer The beauty of the dynamic header & footer The generic picture viewer More: Links Contact: Employment Contact: Analog Space