I've installed the swfobject_api module and I have the following code on a page:

<?php

   $url = "http://132.177.95.125/apache2-default/drupal-5.1/files/hospintro.swf"; //path to flash file
   $params = array('width' => 600, 'height' => 400 );
   print theme("swfobject_api", $url, $params);

?>

This displays the swf correctly, but I also have nicemenus for horizontal menus at the top of the page, and the drop-downs are being hidden behind the swf, no matter what z-index I set in nice-menus. I've tried adjusting the z-index of the swf through my theme css, but I'm not having any luck. The page is at http://132.177.95.125/apache2-default/drupal-5.1/?q=node/39 (test site only). Any suggestions? Thanks!

Comments

arthurf’s picture

zindex only works on elements that are positioned absolutely- see: http://www.w3schools.com/css/pr_pos_z-index.asp

you should be able to define the div that the flash is loaded into as absolute with a zindex- grab firefox and firebug and you can mess around with it until you get it right.

good luck!

koshea’s picture

The solution to this issue is actually to add the parameter wmode="opaque" to the flash.

See here: http://www.communitymx.com/content/article.cfm?cid=e5141

emdalton’s picture

Thanks! I also found this reference to the opaque parameter this morning. But how do I pass this parameter through swfobject_api?

arthurf’s picture

Status: Active » Closed (fixed)

you can pass it in the $params array-
$params['wmode'] = 'opaque';
or
$params = array('width' => 600, 'height' => 400, 'wmode' => 'opaque' );

mustafa.ata’s picture

Thanks koshea, it worked for me, as i was embedding the flash object in my site, I just put param code
in my flash object. Note i used 'transparent' instead of 'opaque' in value parameter, and it works and my dynamic menus comes above flash object in IE7 and IE 8