WMODE and Color Transfom weirdness…

November 30, 2008 · Posted in General, JavaScript 

While I was building a Flash site, I noticed that the color transform that I was applying to my menu items did not work in FF (ver 3 in this case, not sure same across versions), but worked fine in IE and standalone Flash player.

I figured it would have to be caused by the embed code, and after playing around and changing params around, I found that it was due to the wmode param. If I set it to either “opaque” or “transparent” the transform failed to show. But worked fine when set to “window”, the default value. It seems strange that all other thing worked except for the transform?! What is it about it that would stop it working in the other wmodes…?

The winning code:

       <script type="text/javascript">
            // <![CDATA[
                var flashVars = {
                };
                 var params = {
                      wmode: 'window'
                    , allowscriptaccess: "sameDomain"
                }
                   var attributes = {
                      id: 'flashcontent'
                };
                  var expressInstall = false;
                  swfobject.embedSWF( "main.swf", "flashcontent", "100%", "100%", "9.0.115", expressInstall, flashVars, params, attributes );
            // ]]>
        </script>

Comments

Leave a Reply