Author: johnh
Date: Mon Dec  8 08:18:01 2008
New Revision: 724390

URL: http://svn.apache.org/viewvc?rev=724390&view=rev
Log:
Fix for AS3 interaction with IE6/7. An ID must be provided on the <object> tag 
used to embed Flash in these browsers for ExternalInterface method(s) to be 
called.

This resolves bug SHINDIG-723.


Modified:
    incubator/shindig/trunk/features/flash/flash.js

Modified: incubator/shindig/trunk/features/flash/flash.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/flash/flash.js?rev=724390&r1=724389&r2=724390&view=diff
==============================================================================
--- incubator/shindig/trunk/features/flash/flash.js (original)
+++ incubator/shindig/trunk/features/flash/flash.js Mon Dec  8 08:18:01 2008
@@ -60,6 +60,8 @@
   return flashMajorVersion;
 }
 
+gadgets.flash.swfContainerId_ = 0;
+
 /**
  * Injects a Flash file into the DOM tree.
  * @param {String} swfUrl SWF URL.
@@ -119,6 +121,12 @@
       if (typeof opt_params.wmode != 'string') {
         opt_params.wmode = 'opaque';
       }
+      while (!opt_params.id) {
+        var newId = 'swfContainer' + gadgets.flash.swfContainerId_++;
+        if (!document.getElementById(newId)) {
+          opt_params.id = newId;
+        }
+      }
       // Prepare html snippet
       var html;
       if (navigator.plugins && navigator.mimeTypes &&


Reply via email to