mvglafrica Posted January 5, 2007 Share Posted January 5, 2007 Hi All I added some Flash into my Index.php and with IE (like with other Sites that have Flash Content) whenever the index is loaded, the famous "Press Spacebar or Enter to activate this Control" appears. Does anyone know of a snippet of code that I can add to my index.php file to remove this? Any help would be appreciated. Guido Link to comment Share on other sites More sharing options...
kyotee Posted January 5, 2007 Share Posted January 5, 2007 Ok a little background, the short of it is that changes were made because of a patent dispute that Microsoft lost. They posted an article on getting around it here: http://msdn.microsoft.com/library/?url=/wo...ing_activex.asp Link to comment Share on other sites More sharing options...
bustin98 Posted January 5, 2007 Share Posted January 5, 2007 The easy way: Create a new page that turns your Flash object code into a javascript function. function writeFlash(){ document.write(' FLASH HTML CODE HERE '); } Save the page like so: flash.js Then include the javascript page in the header of your page <script language="javascript" type="text/javascript" src="flash.js"></script> Next, within your html where ever you wish to have the Flash object displayed you write <script language="javascript" type="text/javascript"> writeFlash(); </script> The neat thing about doing it this way as opposed to some other ways is it provides an easy way to include flashvars. Link to comment Share on other sites More sharing options...
OSSamm Posted January 5, 2007 Share Posted January 5, 2007 The easy way: Create a new page that turns your Flash object code into a javascript function. function writeFlash(){ document.write(' FLASH HTML CODE HERE '); } Save the page like so: flash.js Then include the javascript page in the header of your page <script language="javascript" type="text/javascript" src="flash.js"></script> Next, within your html where ever you wish to have the Flash object displayed you write <script language="javascript" type="text/javascript"> writeFlash(); </script> The neat thing about doing it this way as opposed to some other ways is it provides an easy way to include flashvars. What if the user has flash but not javascript, you kill both its a double whammy. I would find you more likely to have javascript off too. Link to comment Share on other sites More sharing options...
bustin98 Posted January 5, 2007 Share Posted January 5, 2007 Then you could get more complicated and run a script that looks to the browser type. If its a Microsoft one, use javascript, otherwise it can be scripted as a normal object/embed since Microsoft is the one who needs the fix. The <noscript> tag is useful, too. That being said, Flash should always be looked at as an enhancement, not a requirement to a website. People will disagree with that assement, but when you have visitors who come to your site time and time again, they don't want to mess with anything that is going to slow down their experience. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.