How to display Javascript on top of Flash

Posted under Web Design Blog | Share this on Yahoo Messenger
Digg this Post | Sphinn this Post | Add to Delicious | Add to Technorati | Add to Propeller

Ever had that experience where your javascript is shown behind your flash file? Take a look at this example problem:

How to display Javascript on top of Flash

Having this problem is such an annoyance for webdesigners since this greatly affects the overall design of the site. So I did a search how to solve this problem. Here is what you need to add on your html embed code.

<param name=”wmode” value=”transparent”>

and

<embed wmode=”transparent” src=”flash.swf”>

Update: October 31,2007 

if you are using, AC_FL_RunContent, add this

<script type=”text/javascript”>
AC_FL_RunContent( ‘codebase’,'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0′,’width’,'1000′,’height’,'650′,’src’,'catalogue’,'quality’,'high’,'pluginspage’,'http://www.macromedia.com/go/getflashplayer’,'movie’,'catalogue’,‘wmode’,'transparent’ ); //end AC code
</script>

After you’ve updated the file, it should look like this:

How to display Javascript on top of Flash

This fix works on both IE and Firefox, not sure if it’ll work with other browsers though. Hope this helps. Let me know if you have problems. Thanks.

Check my other posts:

  1. Say Yes to No!Spec - No to Speculative Work
  2. Understanding Royalty-Free Stock Photos
  3. Photoshop TV
  4. Understanding Copyright
View Blog Archives: Click here


5 Responses to “How to display Javascript on top of Flash”


  1. Holly Says:

    I can’t seem to get this to work in IE7, I even tried putting the Flash object and the JavaScript object in seperate DIVs and asigning a z-index to them, still no luck. Any suggestions? Thanks!



  2. Alfredo Says:

    Thanks Holly for the comment. I will try to test on IE7 and will update the post if I find a fix for this problem.



  3. cxc Says:

    on ie7 and firefox not worked … still flash on top …

    ie7 ve firefox da ise yaramadi … flash hala ustte…



  4. Alfredo Says:

    cxc, whats the url?



  5. cxc Says:

    alfredo,
    noting url … still designing pages but i found a solution for the problem here is a link;
    http://blog.deconcept.com/swfobject
    for demo;
    http://www.property-magic.com/lightbox_over_flash.html


Leave a Reply



Search  


ALSO READ

I RECOMMEND

 

CHECK THESE OUT