Posts Tagged flash
Webdesign: show content on top of Flash or Silverlight component
I started playing with JQuery last week and used the Boxy plugin to display a dialog window to the user while disabling all other components. In the background it uses CSS’s z-index property to accomplish this. At least.. almost all components, because as you can see in the video below the flash movie kept appearing on top of the Boxy window. In a later test I noticed the same thing happens for Silverlight components.

Here is how to fix it:
Flash
Flash has a “wmode” parameter which you have to set to “opaque” for the z-index style to have an effect. For instance for the Flash JWPlayer:
<script type='text/javascript'> var s1 = new SWFObject('player.swf','IFIPPlayer','400','300','9'); s1.addParam('allowfullscreen','true'); s1.addParam('allowscriptaccess','always'); s1.addParam('flashvars','type=video&file=movie.flv'); s1.addParam('wmode','opaque'); s1.write('theplayer'); </script>
Silverlight
Silverlight has a “windowsless” property which you have to set to ‘true’ for the z-index style to have an effect. For instance for the Silverlight JWPlayer:
<script type="text/javascript"> var cnt = document.getElementById("theplayer"); var src = '/wmvplayer.xaml'; var cfg = { file:'movie.wmv', image:'thumb.jpg', height:'300', width:'400', windowless:'true' }; var ply = new jeroenwijering.Player(cnt,src,cfg); </script>
And a screenshot to prove it

Add comment October 6, 2009
flash 10 on Ubuntu amd_64
sudo apt-get remove flashplugin-nonfree flashplugin-installer wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz tar xvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz sudo mv libflashplayer.so /usr/lib/mozilla/plugins/
Add comment October 2, 2009