Work around click to activate for flash in IE

100percentpartytime

New Member
Messages
7
Reaction score
0
Points
0
Anyone know if there is a workaround for the "Click to activate" problem with swf files online. I have a swf button and it's just annoying that the user cannot see the action unless they click it first. So far the only workaround I've decided on was checking to see if users are using MSIE then if they are have a link at the bottom of the page telling them to go get firefox because the click to activate doesn't exist there.

<-- added -->A legit work around.
 
Last edited:

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
A quick method of getting around this annoying problem is to write the flash to your HTML from an external Javascript file.

Example
- demo.htm
HTML:
Code:
<html>
	<head>
	<title>IE Flash Fix Demo</title>
	<script language="javascript" src="flashfix.js">
	</head>
	<body>
	<div id="flash_container"></div>
	<script language="javascript">
	writeFlash('flash_container');
	</script>
	</body>
</html>
- flashfix.js

JavaScript:
Code:
function writeFlash(id) {
	document.getElementById(id).innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='200' height='200' id='myflash' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='mymovie.swf' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='mymovie.swf' quality='high' bgcolor='#ffffff' width='200' height='200' name='mymovie' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";

}


Another solution is to use SWFObject. SWFObject has alot of great features for embedding flash into your HTML including the ability to detect what version of flash a user's browser is running.


Finally there is no 'legit' way to make it work. It was introduced by MS as a result of losing a legal patent war =/. Hope this helps anyway.
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
Another option similar to what Mooseman suggested is the Unobtrusive Flash Objects (UFO) script by Bobby van der Sluis.

It's a little more complicated than Mooseman's example, but works great! To find out more about it and how to use it: http://www.bobbyvandersluis.com/ufo/
 

chewett

New Member
Messages
137
Reaction score
0
Points
0
really you might as well use it as an excuse tyo get sed person to get firefox

i am not going to start a war but m$ just loses badley and then makes some hemp little thing. firefox has all the edge tha ie has lost
 

Sohail

Active Member
Messages
3,055
Reaction score
0
Points
36
Wow! Thanks for this information. I am a flash developer and i am sure this will come in handy in the future.
 
Top