Adobe's guideline of publishing active content

Top  Previous  Next  

Preparing your website to handle the Microsoft changes to Internet Explorer with Adobe's solution

 

Many of you have heard about the announced changes to Microsoft Internet Explorer. You may have questions about what's going to happen to your websites that use embedded ("active") content and applications — which can include Adobe Flash, Adobe Acrobat, or Shockwave files. This article details the browser changes, active content workarounds, and resources you will need to make your websites compatible with the updated browser.

 

How the changes affect current sites

 

Users will be able to view embedded content and applications in their present form — until they update their Internet Explorer browsers on Windows. The browser update was first released as an optional update in February 2006. After users update the browser, they have to click embedded or "active" content before they interact with it. Check out the resources on the Microsoft Developer Network (MSDN), where you can get more information.

 

Some sites will not be affected by the change. The updated browser prompts users to click before displaying active content coded using <object> , <embed> , or <applet> tags that are inline in an HTML file. However, HTML pages that use tags generated by external script files (like JavaScript) — such as sites that use complex Flash detection scripts — should continue to work normally with no change.

 

Note: Even though many browsers still support all three tags, the <embed> and <applet> tags are deprecated in favor of the <object> tag.

 

Many of you will want to fix your sites to work around the mandatory browser changes. The good news is that you can apply one of several workarounds to your site right now.

 

Requirements

Download the JavaScript files (ZIP, 124K)

 

Sample of usage

 

There are three steps you need to follow to implement this solution:

 

  1. Copy the external JS file that contains the workaround functions to a shared location on your website. Call it AC_RunActiveContent.js for this example, or other names that you choose.
    The code in the AC_RunActiveContent.js file uses arguments that you pass to it (see Step 3) to construct a complete tag string that it writes to your document.
     
  2. Add a JavaScript include statement that points to the shared JavaScript files from Step 1 to the <head> section of each web page on your site that includes an <object>/<embed> tag:

<script src="[path]/AC_RunActiveContent.js" type="text/javascript"></script>

 

  1. Replace each instance of <object> and <embed> tags in your pages with the appropriate function calls.

<script type="text/javascript">

       AC_FL_RunContent('id','flashchart',

               'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',

               'width','481',

               'height','353',

               'name','flashchart',

               'src','demo/swf/fcp-line-chart?xml_file=demo/data/fcp-line-charts-v1.xml',

               'quality','high',

               'pluginspage','http://www.macromedia.com/go/getflashplayer',

               'movie','demo/swf/fcp-line-chart?xml_file=demo/data/fcp-line-charts-v1.xml');

</script>

 

Solution for users who have JavaScript turned off

 

Both of the above methods rely on JavaScript. A small percentage of visitors to your site may have disabled JavaScript in their browsers. The techniques suggested above will not work for these few users — they won't see your embedded content at all. One thing to keep in mind is that many or most Internet Explorer users who have disabled JavaScript may have also disabled ActiveX support. However, users who have disabled ActiveX have not been seeing Flash and Shockwave content displayed in the browsers. The migration to JavaScript techniques for embedded content doesn't alter or affect their experience. You need to be concerned only about users who have disabled JavaScript but have ActiveX enabled.

 

To provide for the small percentage of users who have disabled JavaScript but have enabled ActiveX, insert the <object> and <embed> tags directly into the HTML, but put them within a <noscript> tag. The <noscript> tag is a standard tag that provides fail-safe alternative code for users who have disabled JavaScript. Here's an example of a standard embedded SWF file nested in a <noscript> tag:

 

<noscript>

<object id="flashchart" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="481" height="353">

       <param name="movie" value="demo/swf/fcp-line-chart.swf?xml_file=demo/data/fcp-line-charts-v1.xml" />

       <param name="quality" value="high" />

       <embed name="flashchart" src="demo/swf/fcp-line-chart.swf?xml_file=demo/data/fcp-line-charts-v1.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="481" height="353"></embed>

</object>

</noscript>

 

Users who have JavaScript disabled will need to click to activate content in the updated browser when they visit a page with code similar to the above. After that, they can interact with the content as they did before.

 

Complete sample

Sample html page with one FCP object (Line Chart + fcp-line-charts-v1.xml XML data file)

 

<html>

<head>

<script src="AC_RunActiveContent.js" type="text/javascript"></script>

</head>

<body>

 

<script type="text/javascript">

       AC_FL_RunContent('id','flashchart',

               'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',

               'width','481',

               'height','353',

               'name','flashchart',

               'src','demo/swf/fcp-line-chart?xml_file=demo/data/fcp-line-charts-v1.xml',

               'quality','high',

               'pluginspage','http://www.macromedia.com/go/getflashplayer',

               'movie','demo/swf/fcp-line-chart?xml_file=demo/data/fcp-line-charts-v1.xml');

</script>

<noscript>

<object id="flashchart" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="481" height="353">

       <param name="movie" value="demo/swf/fcp-line-chart.swf?xml_file=demo/data/fcp-line-charts-v1.xml" />

       <param name="quality" value="high" />

       <embed name="flashchart" src="demo/swf/fcp-line-chart.swf?xml_file=demo/data/fcp-line-charts-v1.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="481" height="353"></embed>

</object>

</noscript>

 

</body>

</html>

 

Read full article about Active Content Update