Almost as if James Yu from Scribd read my mind yesterday. Today he posted code to solve the nagging Z-index problem caused by Flash ads. SCOTTeVEST was running a Flash ad underwear campaign on Lockergnome yesterday and each time I scrolled the browser window, the ad unit would ignore Z-index settings and scroll on top of the navigation bar at the top of the page. For those of us who use Flash on our pages, which is almost unavoidable with YouTube embeds, setting wmode on each object prevents elements like video from displaying on top of navigation and drop down menus. With third-party Flash ads, you can’t control the wmode, which means if the ad server doesn’t set wmode, you end up with the problem I described where flash ignores Z-index settings and displays on top of everything.

James Yu wrote FlashHeed, a jQuery library designed to address this annoyance. By calling the FlashHeed JavaScript on your page, you automatically set wmode for each element, basically re-rendering the Flash ads and forcing them to behave. Now instead of sitting on top of your navigation, the Flash ad Z-index problem is solved and you’ve retaken control of your page. Too bad there isn’t a central location for serving flashheed.js, the way Google’s codebase is serving jQuery. This is a necessary element that would be great to have a universal cache to use.

I’m with James in terms of how I feel about this solution. He points out that solving other people’s coding issues by compromising  your own design simply isn’t the answer. FlashHeed is a clever middle ground, solving the problem without forcing you to change your layout.