<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Slightlymore &#187; Flash</title>
	<atom:link href="http://slightlymore.co.uk/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://slightlymore.co.uk</link>
	<description>The online residence of Clinton the intertube sorcerer</description>
	<lastBuildDate>Sat, 24 Jul 2010 17:11:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-RC2-15161</generator>
		<item>
		<title>Flash and the z-index problem, solved</title>
		<link>http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/</link>
		<comments>http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 21:14:08 +0000</pubDate>
		<dc:creator>Clinton Montague</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML / XHTML]]></category>
		<category><![CDATA[Javascript / jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[swfobject]]></category>

		<guid isPermaLink="false">http://slightlymore.co.uk/?p=474</guid>
		<description><![CDATA[I was always told that Flash would render on top of everything else. That's it. There's no way around it. It meant that whenever I had a design using, say, suckerfish menus, I'd have to be careful to ensure that there was enough space below the menu to accommodate for Flash's nasty little habit. It turns out that the notorious <em>they</em> were wrong. Again. It's amazing just how many times 'they' don't get it quote right, and that the majority of people still believe them.]]></description>
			<content:encoded><![CDATA[<p>I was always told that Flash would render on top of everything else. That&#8217;s it. There&#8217;s no way around it. It meant that whenever I had a design using, say, suckerfish menus, I&#8217;d have to be careful to ensure that there was enough space below the menu to accommodate for Flash&#8217;s nasty little habit. It turns out that the notorious <em>they</em> were wrong. Again. It&#8217;s amazing just how many times &#8216;they&#8217; don&#8217;t get it quite right, and that the majority of people still believe <em>them</em>.</p>
<p>Just a quick side note &#8211; I&#8217;ll be using the excellent sfwobject.js in this tutorial rather than embedding the flash directly in the HTML. </p>
<h4>The problem</h4>
<p>By default, the Flash plugin will do a weird thing. Instead of being displayed <em>inside</em> the browser, it actually makes a new window <em>on top</em> of the browser which synchronises it&#8217;s position with where you&#8217;d expect the flash should be. (Well, actually it&#8217;s a bit more complicated than that, but I won&#8217;t bore you with the nitty-gritty). This means that rather annoyingly, unless you know the fix, flash will always be on top of your other content. Even if you set the z index of the flash to 0 and of your content to a bazillion. <a href="/examples/flash-z-index/broken.html">Take a look at the example</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=iso-8859-1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Flash and the z-index problem. Solved<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;./swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
	#test
	{
		position: absolute;
		top: 300px;
		left: 300px;
		width: 400px;
		background-color: #ccc;
		padding: 10px;
		color: #333;
		font-family: georgia;
		font-size: 2em;
	}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">bgcolor</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#ffffff&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flash&quot;</span>&gt;</span>This is some flash content - you'll need the flash plugin to see it<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;test&quot;</span>&gt;</span>HTML on top of the flash. This page was created for the tutorial <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://slightlymore.co.uk/wisdom/flash-and-the-z-index-problem-solved&quot;</span>&gt;</span>Flash and the z-index problem. Solved<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> on <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://slightlymore.co.uk&quot;</span>&gt;</span>slightlymore<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
	var so = new SWFObject(&quot;wmode.swf&quot;, &quot;wmode.swf&quot;, &quot;550&quot;, &quot;400&quot;, &quot;8&quot;,&quot;#ffffff&quot;);
	so.write(&quot;flash&quot;);
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<h4>The solution</h4>
<p>The solution is simple. With an extra parameter, you can force the flash to render in a different <em>window mode</em>. The window mode that&#8217;s of interest to solve this problem is <del><em>transparent</em></del> <em>opaque</em> (see the <a href="#comment-479">comment by philip</a>). It means (again, in simple terms) that the flash is this time rendered not only inside the browser window, but as if it were a normal image in the document flow instead of in a separate window on top of the browser window. With swfobject, it&#8217;s almost too easy.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">so.<span style="color: #660066;">addParam</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;wmode&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;opaque&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Or if you want to continue being old-school, you could use the following line:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wmode&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;opaque&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<p>Adding everything together will leave you something similar to the code below. Again, I have prepared an <a href="http://slightlymore.co.uk/examples/flash-z-index/">example page</a> for you to look at.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=iso-8859-1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Flash and the z-index problem. Solved<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;./swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
	#test
	{
		position: absolute;
		top: 300px;
		left: 300px;
		width: 400px;
		background-color: #ccc;
		padding: 10px;
		color: #333;
		font-family: georgia;
		font-size: 2em;
	}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">bgcolor</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#ffffff&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flash&quot;</span>&gt;</span>This is some flash content - you'll need the flash plugin to see it<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;test&quot;</span>&gt;</span>HTML on top of the flash. This page was created for the tutorial <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://slightlymore.co.uk/wisdom/flash-and-the-z-index-problem-solved&quot;</span>&gt;</span>Flash and the z-index problem. Solved<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> on <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://slightlymore.co.uk&quot;</span>&gt;</span>slightlymore<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
	var so = new SWFObject(&quot;wmode.swf&quot;, &quot;wmode.swf&quot;, &quot;550&quot;, &quot;400&quot;, &quot;8&quot;,&quot;#ffffff&quot;);
	// this next line is the important one
	so.addParam(&quot;wmode&quot;, &quot;opaque&quot;);
	so.write(&quot;flash&quot;);
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<h4>Grab the files</h4>
<p>I have zipped up all the files used in this tutorial for <a href="/examples/flash-z-index/flash-z-index.zip">you to download</a>.</p>
<h4>Application</h4>
<p>I first saw this being implemented on <a href="http://www.mitchelsliwa.com/">www.mitchelsliwa.com</a> and assumed that the man must have been dabbling with black magic. I&#8217;m currently working on a huge project which uses this code so that we can get a lightbox over a flash site. Where else have you seen this being used?</p>
]]></content:encoded>
			<wfw:commentRss>http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Google, Yahoo and Adobe Flash Crawling Experiment &#8211; Flash &#8216;n&#8217; SEO Indexing</title>
		<link>http://slightlymore.co.uk/google-yahoo-and-adobe-flash-crawling-experiment-flash-n-seo-indexing/</link>
		<comments>http://slightlymore.co.uk/google-yahoo-and-adobe-flash-crawling-experiment-flash-n-seo-indexing/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 20:58:11 +0000</pubDate>
		<dc:creator>Clinton Montague</dc:creator>
				<category><![CDATA[External links]]></category>
		<category><![CDATA[Google / SEO]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://slightlymore.co.uk/?p=205</guid>
		<description><![CDATA[Google claims to now understand and index Flash content. Do we believe it? The clever people over at webdesign beach have set up an entire site to test just that. And the cheeky little devils embedded the text in various ways to catch google out.]]></description>
			<content:encoded><![CDATA[<p>Google claims to now understand and index Flash content. Do we believe it? The clever people over at <a href="http://www.webdesignbeach.com/">webdesign beach</a> have set up an entire site to test just that. And the cheeky little devils embedded the text in various ways to catch google out.</p>
]]></content:encoded>
			<wfw:commentRss>http://slightlymore.co.uk/google-yahoo-and-adobe-flash-crawling-experiment-flash-n-seo-indexing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
