# Using flashobject.js rather than html embed, help setting Flash to tranparent

**URL:** <https://forum.kirupa.com/t/using-flashobject-js-rather-than-html-embed-help-setting-flash-to-tranparent/227609>\
**Category:** flash\
**Created:** [May 31, 2007, 6:31pm UTC](https://forum.kirupa.com/t/using-flashobject-js-rather-than-html-embed-help-setting-flash-to-tranparent/227609 "2007-05-31T18:31:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jillymo](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jillymo](https://forum.kirupa.com/u/jillymo)\
**Post date:** [May 31, 2007, 6:31pm UTC](https://forum.kirupa.com/t/using-flashobject-js-rather-than-html-embed-help-setting-flash-to-tranparent/227609/1 "2007-05-31T18:31:35Z")

</div>

I am using javascript to put a flash file on my html page rather than using the embed tags (a work around for the “gray box” problem in IE)  
I have a drop down menu that is going behind my flash piece and I want it to go over the top. Now I normally know how to fix this by changing the wmode in the html, but I do not know how to set this property in the javascript.

Here is my code:

```auto
<script type="text/javascript">
 var fo = new FlashObject("staff.swf", "firstflash", "530", "500", "8", "#afb0ac");
   fo.addParam("quality", "best");
   fo.write("firstflash");
      </script>

```
