![]() ![]() |
Apr 4 2006, 09:32 AM
Post
#1
|
|
|
COO ![]() ![]() ![]() Group: Admin Posts: 3553 Joined: 1-April 03 Member No.: 2 |
Microsoft is changing the way ActiveX controls work in Internet Explorer. The change affects all interactive ActiveX controls in a web page. In particular, it affects any Flash movie (SWF) content in a web page. This change is in response to the patent claims by EOLAS regarding applications that can run within a web page.
This affects the output from all current and earlier applications which exported HTML/SWF files: SWiSH Lite, SWiSH2, SWiSH Max, SWiSH Video, SWiSH Presenter, SWiSH Pix, as well as all SWiSH Sites. We are working on export changes to our applications to suit these IE changes but in the meantime we ask you to review the details below and apply appropriate changes manually. We offer background information but if you want to skip this and get to our recommended solution start reading from the section A simpler technique below. When do these changes apply to IE? On April 11, a new version of Internet Explorer will be distributed as a mandatory download. New computers that ship with Windows will also include the ActiveX change. Microsoft is offering a one-time "compatibility patch" that will be deployed like a hotfix to let users turn off the changes through to June 2006. During the grace period, Microsoft is recommending that the temporary hotfix not be applied to all machines because another IE update scheduled for June will override all changes. The changes are available for download now with 'Update for Windows XP (KB912945)'. QUOTE This update includes minor changes to how Internet Explorer handles some web pages that use Microsoft ActiveX controls. Certain webpages will require users to manually activate Active X controls by clicking on it or using the TAB key and ENTER key. This update contains all previously released security updates. ... How the change affects web pages To avoid infringing on the EOLAS patent, either: * The ActiveX applications must not be solely within the web page. * The user must click on the ActiveX content to active it. In the latter case, Internet Explorer will display a grey border around the control, and a tooltip telling you that you need to click to activate the control. The control will not respond to the mouse or the keyboard until you activate it. Once it is activated, you can use it as before. For more technical information see HERE. How to have your ActiveX control activated automatically If you do not want users to experience the click-to-activate behaviour described above, then you must modify your web page accordingly. Microsoft recommends several ways of rewriting your web page that replace the object and embed tags with external JavaScript. These involve fairly extensive changes to existing HTML web page tags. See the following Microsoft web page for examples of various techniques and discussion of techniques that will not work. See more information HERE. Another technique is to use a third party JavaScript application that not only provides the automatic ActiveX activation, but also provides other potential benefits. See more information HERE. However, this technique also requires you to replace existing <object> and <embed> tags with calls to JavaScript. A simpler technique A simpler technique that can be used requires only a minimal addition to the existing HTML tags, and a small JavaScript file. This method was posted by Flash user 'fpproductions' in the Adobe’s Flash forum/newsgroup here. With this method, you need to add the following three lines to the <head> tag in HTML web page calling the Flash content: CODE <!--[if gte IE 6]> <script src="dynActiveX.js"></script> <![endif]--> Where 'dynActiveX.js' is the name of the JavaScript file you need to upload with your HTML file. The dynActiveX.js JavaScript file has the following content: CODE // When the page loads: window.onload = function(){ if (document.getElementsByTagName) { // Get all the tags of type object in the page. var objs = document.getElementsByTagName("object"); for (i=0; i<objs.length; i++) { // Get the HTML content of each object tag // and replace it with itself. objs[i].outerHTML = objs[i].outerHTML; } } } // When the page unloads: window.onunload = function() { if (document.getElementsByTagName) { //Get all the tags of type object in the page. var objs = document.getElementsByTagName("object"); for (i=0; i<objs.length; i++) { // Clear out the HTML content of each object tag // to prevent an IE memory leak issue. objs[i].outerHTML = ""; } } } A 'dynActiveX.js' JavaScript file is attached to this post . Step-by-Step Tutorial for SWiSH Max As an example of the process, these are the steps to make these changes using the installed beginner sample 'ray_of_light.swi' exported from SWiSH Max. You can make similar changes to HTML exported from other SWiSHzone.com products. 1. Export the ray_of_light.swi as HTML and SWF (File | Export | HTML+SWF). 2. Edit ray_of_light.html HTML adding the lines mentioned above to the <head> tag as shown in the code displayed below. CODE <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd"> <html> <head> <title>ray_of_light</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="" /> <meta name="generator" content="SWiSHmax http://www.swishzone.com" /> <meta name="description" content="ray_of_light" /> <meta name="keywords" content="play" /> <!-- text used in the movie --> <!-- play --> <!-- Created by SWiSHmax - Flash Made Easy - www.swishzone.com --> <!--[if gte IE 6]> <script src="dynActiveX.js"></script> <![endif]--> </head> <body bgcolor="#000000"> <center> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id="ray_of_light" width="600" height="400" > <param name="movie" value="ray_of_light.swf" /> <param name="bgcolor" value="#000000" /> <param name="quality" value="high" /> <param name="allowscriptaccess" value="samedomain" /> <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="ray_of_light" width="600" height="400" src="ray_of_light.swf" bgcolor="#000000" quality="high" swliveconnect="true" allowscriptaccess="samedomain" > <noembed> </noembed> </embed> </object> </center> </body> </html> 3. Upload the edited ray_of_light.html and ray_of_light.swf with dynActiveX.js attached. We have uploaded these files so you can test the effect of these change for yourself: Click here to see a sample of ray_of_light WITHOUT the changes to the head tag. Click here to see a sample of ray_of_light WITH the changes to the head tag. If you need more information or further assistance please don't hesitate to post questions in the forum. Sincerely, Hugh
Attached File(s)
|
|
|
|
Apr 6 2006, 10:22 AM
Post
#2
|
|
![]() Advanced Member ![]() ![]() ![]() Group: staff Moderator Posts: 10953 Joined: -- From: Newcastle, Australia Member No.: 27 |
Please note:
I have seen some reports of problems if you are passing variables to your SWF movie via the <object> movie param tag in the SWF url. eg <param name="movie" value="mymove.swf?myvar=value" /> If this is indeed a problem, it may be possible to solve it by passing values using the 'flashvar' param instead. However, we are not sure of the details at this stage. We are keeping an eye on this issue. If anyone has any feedback on problem they may have had with the method we have told you about here, please let us know. We will provide you with more information in this thread if/when it comes to light. Thanks -------------------- Roger the RED - SWiSHdeveloper
|
|
|
|
Apr 12 2006, 11:02 PM
Post
#3
|
|
![]() Advanced Member ![]() ![]() ![]() Group: staff Moderator Posts: 10953 Joined: -- From: Newcastle, Australia Member No.: 27 |
Here is latest info from the newsgroup where the simple technique was discussed. Ther eis an update to the code invovled to fix certain issues.
QUOTE I'm glad that people have expanded on the idea, I've been working on a few additions to it too, and I've attached the new code below. I agree that calling the code in window.onload creates cleaner code, but it sometimes creates an obvious double load effect for the flash movies (they appear, then disappear and load again). Calling the code just before the end </body> tag (or right after the last <object> on the page) seems to produce a smoother look to the page. I also tried the code on MSIE on a mac - and it like to crash the browser! Therefore I'd suggest checking for macs in the js, and as MS don't support MSIE on the mac anymore I doubt it'll ever be affected. Another weird point is that if the <object> uses the 'data' attribute (as used in the flash 'satay' xhtml friendly method) then MSIE doesn't see any <param> tags inside the obect when calling outerHTML! My solution is simply to use javascript (removeAttribute) to remove the 'data' attribute and then it work fine! MSIE doesn't use the 'data' information anyway, only Mozilla etc. CODE function ieupdate() {
// Mark Bennett // Code to rewrite the swfs for the msie update // only affects ie on a pc var strBrowser = navigator.userAgent.toLowerCase(); if (strBrowser.indexOf("msie") > -1 && strBrowser.indexOf("mac") < 0) { var theObjects = document.getElementsByTagName('object'); var theObjectsLen = theObjects.length; for (var i = 0; i < theObjectsLen; i++) { if (theObjects[i].outerHTML) { // does the object use the 'data' attribute? // if so msie completely ignores any <param> in the outerHTML // so lets ditch it, as msie doesn't use it, only mozilla etc if (theObjects[i].data) { theObjects[i].removeAttribute('data'); } theObjects[i].outerHTML = theObjects[i].outerHTML; } } } } -------------------- Roger the RED - SWiSHdeveloper
|
|
|
|
Apr 16 2006, 11:20 AM
Post
#4
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Moderator Posts: 17904 Joined: -- From: Perth/Australia Member No.: 25 |
...I didn't get my windows update until last night and this morning when I tried to implement "dynActiveX.js" inc. the code in between the <head> tags, to overcome the "require users to manually activate Active X controls by clicking on it or using the TAB key and ENTER key"...
http://webwolfwonder.com displayed this way...
dynActiveX.jpg ( 7.9K )
Number of downloads: 1206...well, at least the music was still playing So I'm afraid this is not working for me. wolf ...I just noticed this is a read only topic - so if you want to reply to this or report problems with these solutions - I've pinned a topic in SWiSHmax - Tips and tricks (Intermediate) wolf -------------------- |
|
|
|
Apr 16 2006, 11:01 PM
Post
#5
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Moderator Posts: 3636 Joined: 19-December 03 From: Chicago Member No.: 6576 |
From Lee Oswald:
QUOTE since i can't reply to this forum
you don't seem to have the embed html code at your page <!--[if gte IE 6]> <script src="dynActiveX.js"></script> <![endif]--> -------------------- Visit my Record Label or MySpace is another way to say HI.
|
|
|
|
Apr 17 2006, 12:04 AM
Post
#6
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Moderator Posts: 17904 Joined: -- From: Perth/Australia Member No.: 25 |
...hello bill,...as I'm saying, if I use the script and the coding in between the <head> tags - I will get the result shown in the attached image...hence it's not working for me
wolf -------------------- |
|
|
|
Apr 17 2006, 01:08 PM
Post
#7
|
|
![]() Advanced Member ![]() ![]() ![]() Group: staff Moderator Posts: 10953 Joined: -- From: Newcastle, Australia Member No.: 27 |
Can you please make a copy of your web page with the updated HTML avialble, so we can see what you've done and verify how it looks here. Thanks.
-------------------- Roger the RED - SWiSHdeveloper
|
|
|
|
Apr 17 2006, 01:22 PM
Post
#8
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Moderator Posts: 17904 Joined: -- From: Perth/Australia Member No.: 25 |
...try this http://wolfgross.com/index2.html ...I can not test it anymore because I've installed the MS patch on my system and it's fine now, except it loads twice.
wolf -------------------- |
|
|
|
Apr 19 2006, 10:51 AM
Post
#9
|
|
![]() Advanced Member ![]() ![]() ![]() Group: Admin Posts: 6292 Joined: -- Member No.: 7 |
Can we please move further discussion and testing results to the thread in 'Tips & Tricks' please?
<edit>link removed, cant find the thread anymore. Here is a new pinned thread for discussion and testing - LINK</edit> ....and keep this thread for any solutions/news on the issue. -------------------- ![]() |
|
|
|
Apr 19 2006, 10:13 PM
Post
#10
|
|
![]() Advanced Member ![]() ![]() ![]() Group: staff Moderator Posts: 10953 Joined: -- From: Newcastle, Australia Member No.: 27 |
Here is another alternative from the same discussion thread in the Flash newsgroup.
NOTE: Just updated it with latest code from http://activecontent.blogspot.com/ ... it seems to solve all the problem with other solutions, yet still does not require rewriting of existing object/embed tags. Code for external 'ieupdate.js' file... CODE var bo_ns_id = 0; function startIeFix() { if (isIE()) { document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- '); } } function endIeFix() { if (isIE()) { document.write('</div>'); var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++); var theCode = theObject.innerHTML; theCode = theCode.substring(4 ,9+theCode.indexOf("</object>")); document.write(theCode); } } function isIE() { // only for Win IE 6+ // But not in Windows 98, Me, NT 4.0, 2000 var strBrwsr= navigator.userAgent.toLowerCase(); if (strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0) { if (parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6) { return false; } if (strBrwsr.indexOf("win98") > -1 || strBrwsr.indexOf("win 9x 4.90") > -1 || strBrwsr.indexOf("winnt4.0") > -1 || strBrwsr.indexOf("windows nt 5.0") > -1) { return false; } return true; } else { return false; } } Code for page: In between the <head> tags at the top of the page include the line... CODE <script type="text/javascript" src="ieupdate.js"></script> Then where you have your object and embed tags... CODE <script type="text/javascript">startIeFix();</script>
<object ...etc etc </object> <!-- --><script type="text/javascript">endIeFix();</script> -------------------- Roger the RED - SWiSHdeveloper
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 9th February 2010 - 10:52 PM |