IE Flash Activiation

Author Message

declan reynolds

Thursday 11 January 2007 7:26:58 pm

Hi All,

Anyone know how to sort out the Flash Activation Bug in IE so a user does not have to click the .SWF to make it work?

Many thanks,

declan

Nuno Portugal

Tuesday 22 January 2008 11:24:52 am

Hi, I found the solution to the activation bug with javascript. Here is what i've done in version 3.8.6 and it works fine.

Save text as file withe the name "activateActiveX_onload.js"

*******************************************************************************************
/*
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 in the <head></head> section of your html document using the following...
<script language="JScript" type="text/jscript" src="activateActiveX_onload.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
*/

//trap onload event
window.onload = function () {
//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;

}
}
}
}

**************************************************************************************************

Upload the file to /yoursite/design/standard/javascript

Edit design.ini and add the js filename =activateActiveX_onload.js

Make it as global defitnition.

NOTE: It works fine with Flash 8 content. Didn´t try with Flash 9...

Hope it gets usefull...

Lukasz Klejnberg

Tuesday 22 January 2008 1:32:52 pm

see swf object, it works very well with ez publish

http://blog.deconcept.com/swfobject/

Piotrek Karaś

Tuesday 22 January 2008 1:37:36 pm

Here's probably the most popular SWF library, that also takes care of the problem:
http://blog.deconcept.com/swfobject/
One drawback is that you require javascript for flash movies to show up, but actually IE bug requires 'outside javascript-like embedding' anyway, so... ;)

Good luck,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:01:51
Script start
Timing: Jan 31 2025 06:01:51
Module start 'layout'
Timing: Jan 31 2025 06:01:51
Module start 'content'
Timing: Jan 31 2025 06:01:51
Module end 'content'
Timing: Jan 31 2025 06:01:51
Script end

Main resources:

Total runtime0.0168 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.1250151.2109
Module start 'layout' 0.00490.0032 739.335936.6484
Module start 'content' 0.00800.0071 775.984494.1250
Module end 'content' 0.01510.0016 870.109437.9922
Script end 0.0168  908.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.3843140.0002
Check MTime0.00106.1801140.0001
Mysql Total
Database connection0.00084.807510.0008
Mysqli_queries0.002514.717130.0008
Looping result0.00000.160110.0000
Template Total0.00127.110.0012
Template load0.00105.644610.0010
Template processing0.00021.379610.0002
Override
Cache load0.00063.820210.0006
General
dbfile0.002112.466480.0003
String conversion0.00000.045340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs