Learning Is Fun

Talks on Web Technology and Better Product Development

Flash swf and Lightbox overlapping problem solution

December13

Recently I was working in an American project where my client wanted to convert this static site to dynamic. Everything was fine except the gallery. The existing gallery was done using Lightbox effect and there was a flash audio file. The audio file was avoiding the Lightbox effect and coming overlapping any effect. And this is where the problem started.

OK. See below for an idea how it looked:

Not funny or interesting. Ugly, Huh? So, my client requested to fix it.

But what is the reason for this problem? Hm? Actually this was happening because Flash file is always above any other elements in your page. It comes at the topmost priority position in your page and that is why it can ignore the Lightbox effect. Our job is to make sure taht the Flash swf file stands behind the door when a Lighbox effect is in action. Clear?

In few blogs, I found possible solutions and they did not work. One possible solution that I thought would work was using z-index property in CSS. One coder advised to keep the embedding code in a lower z-index (such as 0) and keeping the container gallery in higher z-index (such as 1). Although he said, it worked for her, but did not work for me. But you can give a try if you want. May be this trick can work for you depending you code.

So, how did you fix it so that it looks like as follows?

So, what is the trick?  If you make sure that you added the following lines bold red in your HTML code, the problem is solved.

<?php
$client_testimonial = “/testimonials/audio_file.mp3″;
?>
<object type=”application/x-shockwave-flash” width=”200″ height=”15″
data=”/testimonials/xspf_player_slim.swf?song_url=<?php echo $client_testimonial; ?>&song_title=Air-trekkers Testimonial&player_title=Click to hear testimonial!”>
<param name=”wmode” value=”opaque”>
<param name=”movie”
value=”/testimonials/xspf_player_slim.swf?song_url=<?php echo $client_testimonial; ?>&song_title=Air-trekkers Testimonial&player_title=Click to hear testimonial!” />
<embed wmode=”opaque” src=”/testimonials/xspf_player_slim.swf?song_url=<?php echo $client_testimonial; ?>&song_title=Air-trekkers Testimonial&player_title=Click to hear testimonial!” quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”200″ height=”15″></embed>
</object>

That is all and…

Thank you for reading.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
posted under AJAX, PHP, Wordpress
15 Comments to

“Flash swf and Lightbox overlapping problem solution”

  1. On May 11th, 2009 at 11:33 am Matheus Says:

    Thankx dude, you really help me.

  2. On June 2nd, 2009 at 4:27 pm Phantom Says:

    Man!!!, you save my day, thx a million. :)

  3. On June 3rd, 2009 at 7:02 pm Jie Says:

    thanks man :)

  4. On July 26th, 2009 at 3:44 pm Onno Says:

    Thanks man, that helped me out a lot!!!

  5. On September 7th, 2009 at 8:54 am sandeep upadhyay Says:

    Thanks dear, your information really great and help me , but i have facing overlaping problem in firefox and chrome. In IE it;s work find but not in firefox and chrome

  6. On October 28th, 2009 at 12:43 am srisailam Says:

    sorry ya, it’s not help’s me, give me some other solution man, actually i’m using facebox(this is also one type of lightbox). this one i took from Dynamic drive website man, In this it is not working properly ya, plz give me ya other solution man.

    byeeeeee
    Srisailam

  7. On November 25th, 2009 at 9:12 am kostis Says:

    Thanks man! You are great!
    Your help was great!
    I’ m very huppy now!!! :)

  8. On December 13th, 2009 at 7:11 am DeepGirl Says:

    Thanks a lot! This really helped me!

  9. On December 28th, 2009 at 3:07 pm austin Says:

    thank you!!!

  10. On January 15th, 2010 at 4:13 am flat Says:

    thanks..it really works!!!! tnx a lot :)

  11. On February 19th, 2010 at 10:42 am Delfresh Says:

    Hi! at had the same problem, you’ve only changed it at 2 places, this did’nt worked for me, I changed it at 3 places: so this is the code:

    AC_FL_RunContent( ‘codebase’,'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’1013′, ‘height’,’177′,’src’,'flash/flash_header’,'quality’,'high’,'pluginspage’, ‘http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,'movie’,'flash
    /flash_header’,

    ‘wmode’,'opaque’ );

    //end AC code

    Good luck!

  12. On March 17th, 2010 at 8:20 am Jessie Says:

    Thanks. you have saved my time. It works fine for me.

  13. On March 19th, 2010 at 12:07 am Nitesh Says:

    Thanks Dude ! It working fine Gr8 Research !

  14. On June 25th, 2010 at 11:58 am Gaurang Daslania Says:

    Its working.. thank you very much..!!

  15. On July 11th, 2010 at 2:45 am Cristian Udrea Says:

    Thanks a bunch, that was a really short and efficient fix. Saved me a couple of hours of searching!

Email will not be published

Website example

Your Comment: