swfObject help when placing a div over flashposted in Flash Tutorials
Working on a new website for a client right now and ran into a problem.
The logo looked a little blurry when animated in the flash header, so I decided the best solution would be to place a floating div over the flash header.
If you’re not sure how to do this yet, here’s how:
1. In your code for the flash file, add the following:
|<param name=”wmode” value=”transparent”>|
2. In the “embed” area, you need to add this:
Add your div with absolute positioning and off you go.
So, this works all well and good when you aren’t using the swfObject to embed the flash and get rid of the nasty flash activation box that surrounds all flash files in IE.
I searched on Google for a while this morning but could not find an example of someone having a problem with this.
How do we fix this? That’s what I was having trouble with for a few minutes. I couldn’t figure out why my div was now behind the flash file.
Then, I realized what needs to be added to the JS that is comes with the swfObject.
Simply, add this to the JS from the box above:
This now tells the JS to write this parameter also as it is already included in our first two steps we did to get the div to float over it.