Internet Explorer 7 - Problem with flash animations

Last update on April 12, 2009 04:33 PM by jak58
Published by jad05

Internet Explorer 7 - Problem with flash animations






Here is a trick that can help when in Internet Explorer 7, when a flash animation is replaced by a gray frame that you have to click to start the animation.

Just use this simple script.


/*
  activateActiveX
  ---------------
  Purpose: Dynamically replace any elements that will be affected by the new security feature in IE6/IE7 that requires a user to click certain types of elements to activate them before use.
  Usage: Include this file at the end of your html document using the following...
  <script language="JScript" type="text/jscript" src="activateActiveX.js"></script>

  Since this script is in response to a software patent lawsuit, I feel it necessary to state the following...

  License:
  activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com). It is available as open source code from: http://therippa.blogspot.com

  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details http://www.gnu.org/licenses/gpl.html*/

//Determine browser, we only need this for Internet Explorer
if (navigator.appName == "Microsoft Internet Explorer") {

//Array of elements to be replaced
var arrElements = new Array(3);
arrElements[0] = "object";
arrElements[1] = "embed";
arrElements[2] = "applet";


//Loop over element types
for (n = 0; n < arrElements.length; n++) {

  //set object for brevity
  replaceObj = document.getElementsByTagName(arrElements[n]);

  //loop over element objects returned
  for (i = 0; i < replaceObj.length; i++ ) {

  //set parent object for brevity
  parentObj = replaceObj[i].parentNode;

  //grab the html inside of the element before removing it from the DOM
  newHTML = parentObj.innerHTML;

  //remove element from the DOM
  parentObj.removeChild(replaceObj[i]);

  //stick the element right back in, but as a new object
  parentObj.innerHTML = newHTML;

  }
}
}


Then place a link to your file before the closing </ body> tag of the pages that are problematic:


<script language="JScript" type="text/jscript" src="activateActiveX.js"></script>
</body>
</html>





It should be, no need of having to click to start the animation.
Best answers for « Internet Explorer 7 Problem with flash animations » in :
Opening all pages in a new tab with Internet Explorer 7 Show Opening all pages in a new tab with Internet Explorer 7 Solution When surfing through Internet Explorer 7, you notice that all pages are opened by default in a new window. Solution Below is a proposed solution of how to force...
Installing Internet Explorer 7 on XP SP3 Show Installing Internet Explorer 7 on XP SP3 Internet Explorer 7 is not compatible with service pack 3 is already installed. You should however install SP3 after installing IE7. This is a tip showing you how to install IE7 if SP3 is...
Internet Explorer cache ShowInternet Explorer cache Cache Levels in Internet Explorer Change the size of Internet cache Clear the internet Cache When you browse the Web, your browser makes web pages in a cache, i.e. it stores the pages, images and other files...
Uninstalling Internet Explorer 8 ShowUninstalling Internet Explorer 8 Windows Vista Windows XP You have installed IE8 to test and now you want to revert to a previous version? Here are the steps: Windows Vista Open the Control Panel Select Programs and Features...
Reinstalling Internet Explorer ShowReinstalling Internet Explorer Solution Editing the registry When trying to reinstall Internet Explorer, below error message appears on your screen: Setup has detected a newer version of Internet Explorer already installed on...
Iexplore - iexplore.exe Showiexplore - iexplore.exe iexplore.exe (iexplore stands for Internet Explorer) is a Windows process which corresponds the web browser Internet Explorer. The process iexplore is not in any way a virus, a worm, a Trojan horse, spyware, or adware. It is...