<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Studio moh</title>
	
	<link>http://www.studiomoh.com/blog</link>
	<description>Blog of Dylan Hafertepen</description>
	<pubDate>Thu, 18 Jun 2009 22:51:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/StudioMoh" /><feedburner:info uri="studiomoh" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>findByName() for Flash AS3</title>
		<link>http://www.studiomoh.com/blog/105/</link>
		<comments>http://www.studiomoh.com/blog/105/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 22:51:36 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=105</guid>
		<description><![CDATA[I&#8217;m spoiled by jQuery. When I want to find an element and do something it&#8217;s as painless as $(element).doSomething(now);.  Not so in Flash.  God help you if the sprite you want is nestled inside a dynamically loaded SWF inside of a movieClip in a different layer.  That&#8217;s, like, getChildAt()*10200.
This little guy has [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m spoiled by jQuery. When I want to find an element and do something it&#8217;s as painless as <code>$(element).doSomething(now);</code>.  Not so in Flash.  God help you if the sprite you want is nestled inside a dynamically loaded SWF inside of a movieClip in a different layer.  That&#8217;s, like, <code>getChildAt()</code>*10<sup>200</sup>.</p>
<p>This little guy has saved me so much time traversing Flash&#8217;s DisplayList.  It&#8217;s not quite as functional as the CSS selectors in jQuery, but selecting something by name without having to chain node-by-node is suuuuch a time saver.  Enjoy:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">import</span> flash.<span style="color: #660066;">utils</span>.<span style="color: #660066;">getQualifiedClassName</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getClassName<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">:</span>Object<span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>String <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>obj <span style="color: #000066; font-weight: bold;">is</span> <span style="color: #003366; font-weight: bold;">Class</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> s<span style="color: #339933;">:</span>String <span style="color: #339933;">=</span> obj.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #006600; font-style: italic;">// &quot;[class SoAndSo]</span>
		<span style="color: #000066; font-weight: bold;">return</span> s.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">7</span><span style="color: #339933;">,</span> s.<span style="color: #660066;">length</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> fullClassName<span style="color: #339933;">:</span>String <span style="color: #339933;">=</span> getQualifiedClassName<span style="color: #009900;">&#40;</span>obj<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span> fullClassName<span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//.slice(fullClassName.lastIndexOf('::') + 2);</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> findByName<span style="color: #009900;">&#40;</span>container<span style="color: #339933;">:*,</span> objName<span style="color: #339933;">:</span>String<span style="color: #009900;">&#41;</span><span style="color: #339933;">:*</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">/**
		findByName takes a container and a name and returns the object if found.
		Because Flash is so annoying with it's displaylist.
	**/</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> child<span style="color: #339933;">:</span>Object<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">:</span>uint<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> container.<span style="color: #660066;">numChildren</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		child<span style="color: #339933;">=</span>container.<span style="color: #660066;">getChildAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>getClassName<span style="color: #009900;">&#40;</span>child<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> objName <span style="color: #339933;">||</span> child.<span style="color: #000066;">name</span> <span style="color: #339933;">==</span> objName<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Found: '</span> <span style="color: #339933;">+</span> objName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> container.<span style="color: #660066;">getChildAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>container.<span style="color: #660066;">getChildAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">is</span> DisplayObjectContainer<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			child<span style="color: #339933;">=</span>findByName<span style="color: #009900;">&#40;</span>DisplayObjectContainer<span style="color: #009900;">&#40;</span>child<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> objName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">return</span> child<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/105/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Elements of Design</title>
		<link>http://www.studiomoh.com/blog/103/</link>
		<comments>http://www.studiomoh.com/blog/103/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 19:04:11 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=103</guid>
		<description><![CDATA[
ArtPiles is going to be a little bit more visual than FAP.  I&#8217;m especially happy with the touches of leather and chrome.  I think it&#8217;ll give the interface a sexy look without distracting from the content.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.californiacow.com/orange/elements-of-art-piles.jpg" alt="ArtPiles" /></p>
<p>ArtPiles is going to be a little bit more <i>visual</i> than FAP.  I&#8217;m especially happy with the touches of leather and chrome.  I think it&#8217;ll give the interface a sexy look without distracting from the content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/103/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Almost but not quite</title>
		<link>http://www.studiomoh.com/blog/95/</link>
		<comments>http://www.studiomoh.com/blog/95/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 01:40:29 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=95</guid>
		<description><![CDATA[
Why is it so difficult to graph a timeline?  I always end up with something hideous like this.  There has got to be a prettier way.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://californiacow.com/orange/difficult2graph.jpg"><img src="http://californiacow.com/orange/difficult2graph.jpg" alt="" /></a></p>
<p>Why is it so difficult to graph a timeline?  I always end up with something hideous like this.  There has got to be a prettier way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/95/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On Modal Alerts</title>
		<link>http://www.studiomoh.com/blog/93/</link>
		<comments>http://www.studiomoh.com/blog/93/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 01:39:59 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=93</guid>
		<description><![CDATA[I like asking you guys for input, it saves a lot of development time :D
SO.  How about this?  RPG-style modal alerts!

(I&#8217;d make them prettier, I promise)
Instead of a boring, lame-o modal alert &#8220;Are you sure you want to delete this?&#8221; you get this fun RPG styled alert box.  And then I can [...]]]></description>
			<content:encoded><![CDATA[<p>I like asking you guys for input, it saves a lot of development time :D</p>
<p>SO.  How about this?  RPG-style modal alerts!</p>
<p><img src="http://www.californiacow.com/orange/rpg-modal.jpg" alt="RPG style modal alert box wow" /><br />
(I&#8217;d make them prettier, I promise)</p>
<p>Instead of a boring, lame-o modal alert &#8220;Are you sure you want to delete this?&#8221; you get this fun RPG styled alert box.  And then I can use the mascots of the site as, like, personable guides.</p>
<p>Like that jumping bird!</p>
<p><img src="http://www.californiacow.com/orange/ffloading.gif" alt="Jumping bird!" /></p>
<p>He could tell you to&#8230;uh&#8230;</p>
<p><del>Okay, now this idea is stupid.</del></p>
<p>Edit: Okay, you know, the more I think about this, the more I like it!  The modal has become a dialog balloon for a character.  He can have different emotions for different actions as represented through his icon.  Like, in this example, he&#8217;s frowning a little bit.  People will subconsciously pick up on his emotion.</p>
<p>Giving the modal a face like this changes it from a machine interaction into an emotional one.  The dialog has personality, there is a character asking you this question.</p>
<p>Okay.  I love it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/93/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Piles and Piles of Art</title>
		<link>http://www.studiomoh.com/blog/91/</link>
		<comments>http://www.studiomoh.com/blog/91/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 01:39:24 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=91</guid>
		<description><![CDATA[I can&#8217;t wait for Art Piles to go live.
There are so many wonderful ideas in this project.  New interfaces, ways to sustain the community, privacy&#8230;
Okay!  :DDD!  I can&#8217;t help myself!  I love solving difficult community problems through interface&#8211;it gives me the biggest design hard-on ever.  Like, just before FAP closed, [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t wait for Art Piles to go live.</p>
<p>There are so many wonderful ideas in this project.  New interfaces, ways to sustain the community, privacy&#8230;</p>
<p>Okay!  :DDD!  I can&#8217;t help myself!  I love solving difficult community problems through interface&#8211;it gives me the <b>biggest design hard-on ever</b>.  Like, just before FAP closed, there was a huge surge of users&#8230;which directly affected the quality of comments on the site.</p>
<p>It always seems like the more popular something becomes the more <i>noise</i> there is to wade through.</p>
<p>Current solutions around the web are comment rating systems for comments (eg, this is a 5-star comment), authority systems for users making comments (like, the more comments you make the higher your rank)&#8230;but, these all seem pretty arbitrary.  One of my biggest goals was to promote a commentary-rich community through the interface.  Commenting was painless, and the resulting comments were laid out to prevent lame comments (my favourite: newest comments on top prevents that stupid &#8220;FIRST&#8221; comment).</p>
<p>ANYWAY.</p>
<p>One of my favourite new features to improve the quality of comments is inspired by XKCD&#8217;s ROBOT3000:</p>
<blockquote><p>Every comment is unique.</p></blockquote>
<p>That means there would only be one &#8220;FIRST!&#8221; one &#8220;Thanks for the watch!&#8221; one &#8220;+fav&#8221;.  The comments would still post, but they&#8217;re ranked lower.  More &#8220;complex&#8221; comments (calculated by length, reading difficulty, emoticon use, <b>spelling</b>, etc) are ranked higher.</p>
<p>Suddenly, good comments aren&#8217;t just something you do when you&#8217;re bored at 2AM and can&#8217;t sleep.  If you want to be noticed on the site, you have to articulate.  Thoughtful commentators are rewarded.  They&#8217;re ranked on the leader board as a reward for their contribution to the community.</p>
<p>Competition and attention are the most compelling forces in a community.</p>
<p>Can anyone imagine what would happen if fChan implemented this?  Or Youtube?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/91/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Taste Captcha</title>
		<link>http://www.studiomoh.com/blog/97/</link>
		<comments>http://www.studiomoh.com/blog/97/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 01:41:05 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=97</guid>
		<description><![CDATA[Here is my idea.
Instead of using lame word CAPTCHAs, I want to build a CAPTCHA that pulls the aggregate most funny and least funny images from http://thefunniest.info/
The CAPTCHA will present the user with 3 images.  Only one of them is funny.
I used to be against using CAPTCHA that could discriminate against taste or mentally [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my idea.</p>
<p>Instead of using lame word CAPTCHAs, I want to build a CAPTCHA that pulls the aggregate <i>most funny</i> and <i>least funny</i> images from http://thefunniest.info/</p>
<p>The CAPTCHA will present the user with 3 images.  Only one of them is funny.</p>
<p>I used to be against using CAPTCHA that could discriminate against taste or mentally retarded people, but if you don&#8217;t think <a href="http://img.photobucket.com/albums/v395/rubyeye/MiscHostedPics/GoodMorningLemmings.jpg?t=1165549817">this is funny</a>, you must be a robot.</p>
<p>I wish http://thefunniest.info/ had an API so I could whip this up right now :(</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/97/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Logo work: Boy Country</title>
		<link>http://www.studiomoh.com/blog/87/</link>
		<comments>http://www.studiomoh.com/blog/87/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 01:37:13 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=87</guid>
		<description><![CDATA[
I feel like every movie uses this font.  The trick was to make it elegant and modern to stand out from other Collegiate-branded films.
I&#8217;m a big fan of the star motif and look forward to using them throughout the DVD packaging design.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.californiacow.com/orange/bsp015-logo.jpg"><img src="http://www.californiacow.com/orange/bsp015-logo.jpg" alt="" title="bsp015-logo" class="alignnone size-medium wp-image-1050" /></a></p>
<p>I feel like every movie uses this font.  The trick was to make it elegant and modern to stand out from other <i>Collegiate</i>-branded films.</p>
<p>I&#8217;m a big fan of the star motif and look forward to using them throughout the DVD packaging design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/87/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Design Dilemma</title>
		<link>http://www.studiomoh.com/blog/82/</link>
		<comments>http://www.studiomoh.com/blog/82/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 03:32:20 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=82</guid>
		<description><![CDATA[studiomoh.com is going through some serious re-designs.  I keep waffling on a fluid layout, fixed layout, vertical column VS horizontal, single-page VS segmented content&#8230;ugh.
Design dilemma.
Please excuse the current iteration of studio moh while I rest on the design.
]]></description>
			<content:encoded><![CDATA[<p>studiomoh.com is going through some serious re-designs.  I keep waffling on a fluid layout, fixed layout, vertical column VS horizontal, single-page VS segmented content&#8230;ugh.</p>
<p>Design dilemma.</p>
<p>Please excuse the current iteration of studio moh while I rest on the design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/82/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New logo: Bears Uncorked</title>
		<link>http://www.studiomoh.com/blog/80/</link>
		<comments>http://www.studiomoh.com/blog/80/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 19:28:35 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[logo]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/?p=80</guid>
		<description><![CDATA[
Logo work for my friend Jeremy&#8217;s new wine club.  He&#8217;s a bear.
The original inspiration for the logo was based on those Indian Petroglyphs where the animal has an arrow (it&#8217;s life meter) going from the mouth to the stomach:

Turns out they&#8217;re called Fetishes.  Imagine my delight when I googled Bear Fetish for reference [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.californiacow.com/orange/bears-uncorked.gif" alt="Bears uncorked" /></p>
<p>Logo work for my friend Jeremy&#8217;s new wine club.  He&#8217;s a <em>bear</em>.</p>
<p>The original inspiration for the logo was based on those Indian Petroglyphs where the animal has an arrow (it&#8217;s life meter) going from the mouth to the stomach:</p>
<p><img src="http://www.californiacow.com/orange/thumbs/th_bear_fetis.png" alt="Bear Fetish" /></p>
<p>Turns out they&#8217;re called <i>Fetishes</i>.  Imagine my delight when I googled <i>Bear Fetish</i> for reference material.</p>
<p>The bear, unfortunately, is a humped animal.  The shape is perfect for a fetish arrow, but the wine bottle didn&#8217;t work as I had imagined it.</p>
<p>Instead, the wine bottle becomes the innards of the bear, the lip of the bottle his subtle smile, and the remainder of the wine drooling from his mouth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/80/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pure CSS LightBox, no Javascript (now supports IE5+)</title>
		<link>http://www.studiomoh.com/blog/4/</link>
		<comments>http://www.studiomoh.com/blog/4/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 17:55:08 +0000</pubDate>
		<dc:creator>Dylan Hafertepen</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.studiomoh.com/blog/27/</guid>
		<description><![CDATA[Click here to preview the CSS LightBox
Finally, a lightbox that doesn&#8217;t require Javascript! And now it support IE5+!
The core of Multi-state CSS is the :target pseudo selector. When a user clicks a page-anchor the :target pseudo selector is activated, revealing the lightbox element.
IE5+ doesn&#8217;t support the :target pseudo selector, but it does support CSS expressions. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.studiomoh.com/fun/csslightbox/">Click here to preview the CSS LightBox</a></p>
<p>Finally, a lightbox that doesn&#8217;t require Javascript! And now it support IE5+!</p>
<p>The core of Multi-state CSS is the <code>:target</code> pseudo selector. When a user clicks a page-anchor the <code>:target</code> pseudo selector is activated, revealing the lightbox element.</p>
<p>IE5+ doesn&#8217;t support the <code>:target</code> pseudo selector, but it <i>does</i> support CSS expressions. With this in mind, we can write a carefully crafted expression that mimicks <code>:target</code>.</p>
<p>Here&#8217;s the code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.lb</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'screen.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #6666ff;">.lb</span><span style="color: #3333ff;">:target </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** IE doesn't support :target, so we use CSS expressions **/</span>
div<span style="color: #6666ff;">.lb</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> expression<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">&#40;</span>document<span style="color: #6666ff;">.location</span>.toString<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">&#41;</span>.split<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'#'</span><span style="color: #00AA00;">&#41;</span>.slice<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">==</span> this.id<span style="color: #00AA00;">&#41;</span>?<span style="color: #ff0000;">'block'</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'none'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><a href="http://www.studiomoh.com/fun/csslightbox/">Click here to preview the CSS LightBox</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.studiomoh.com/blog/4/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
