Overlapping 2 Flash objects and controlling z-index

Posted by Magnus Smith on Stack Overflow See other posts from Stack Overflow or by Magnus Smith
Published on 2010-04-11T20:48:54Z Indexed on 2010/04/11 20:53 UTC
Read the original article Hit count: 284

Filed under:
|
|
|

I have two Flash objects on a webpage (call them A and B), and they overlap so one partially obscures the other. I don't seem to have any control over the z-index, to force B in front of A. Whatever I try, A always 'wins' and stays on the top!

I have read many people's posts about problem with getting HTML to show over the top of Flash...but nothing about when your two overlapping items are both Flash objects.

  • I have tried various combinations of wmode=opaque/transparent/window
  • I have tried CSS position:absolute/relative and z-index:0/999
  • I have tried placing the HTML sections in a different order
  • The problem is the same in IE6 and Firefox 2.0
  • I do not want to use jQuery in this case

In my particular situation B must have position:absolute and wmode=transparent, and sit above A. A needs relative positioning and transparency is not required. However, I have been testing without these restrictions, and I still have no control over the overlap. Are some SWFs (ours are adverts sent by clients) created in such a way as to override any code control of z-index?

Thanks for any advice you can give.

© Stack Overflow or respective owner

Related posts about flash

Related posts about overlap