Forums / Setup & design / IE Flash Activiation

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

eZ debug

Timing: Jan 18 2025 18:18:45
Script start
Timing: Jan 18 2025 18:18:45
Module start 'content'
Timing: Jan 18 2025 18:18:45
Module end 'content'
Timing: Jan 18 2025 18:18:45
Script end

Main resources:

Total runtime0.1926 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.7031180.8438
Module start 'content' 0.00550.0061 768.546997.8516
Module end 'content' 0.01170.1809 866.3984525.7500
Script end 0.1925  1,392.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00341.7756200.0002
Check MTime0.00130.6791200.0001
Mysql Total
Database connection0.00110.572110.0011
Mysqli_queries0.143974.72871410.0010
Looping result0.00190.99791390.0000
Template Total0.180593.710.1805
Template load0.00100.501110.0010
Template processing0.179593.190110.1795
Override
Cache load0.00070.361810.0007
Sytem overhead
Fetch class attribute can translate value0.00100.505210.0010
XML
Image XML parsing0.00020.103410.0002
General
dbfile0.00351.8022200.0002
String conversion0.00000.002530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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