<?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>Clayton McIlrath &#187; Tutorial</title>
	<atom:link href="http://thinkclay.com/category/tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://thinkclay.com</link>
	<description>Creative Media Design, Powered by Wordpress</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:35:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Setup SVN in Hostmonster Shared Hosting</title>
		<link>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting</link>
		<comments>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting#comments</comments>
		<pubDate>Tue, 27 Apr 2010 06:09:26 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Versioning]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1335</guid>
		<description><![CDATA[<a href="http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting"><img src="http://thinkclay.com/wp-content/uploads/2010/04/svn-hostmonster.jpg" alt="" title="svn-hostmonster" width="300" height="200" class="alignleft" /></a>
I've had my fair share of installs in <strong>shared hosting</strong>, but sometimes simple things like <strong>SVN</strong> can get very tricky with providers like <strong>Hostmonster</strong> or <strong>BlueHost</strong>. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server <em>svninstall.sh</em> and then to run just execute <em>. .svninstall.sh</em> and you're off! Comment here if you get and errors and I'd be glad to help.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had my fair share of installs in <strong>shared hosting</strong>, but sometimes simple things like <strong>SVN</strong> can get very tricky with <strong>hosting providers</strong> like <strong>Hostmonster</strong> or <strong>BlueHost</strong>. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server (i called mine <em>svninstall.sh</em>) and then to run just execute <em>. .svninstall.sh</em> and you&#8217;re off! Comment here if you get and errors and I&#8217;d be glad to help.</p>
<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#!/bin/sh
&nbsp;
export svn=1.6.9
export ipath=$HOME/tools64/
export dev=$HOME/dev/svn
&nbsp;
mkdir -p $ipath
mkdir -p $dev
cd $dev
&nbsp;
if [ ! -f $dev/subversion-deps-$svn/__download ] ; then
	rm subversion-deps-$svn.tar.bz2*
	wget http://subversion.tigris.org/downloads/subversion-deps-$svn.tar.bz2 &amp;&amp; \
		tar -xjf subversion-deps-$svn.tar.bz2 &amp;&amp; \
		mv subversion-$svn subversion-deps-$svn &amp;&amp; \
		touch  subversion-deps-$svn/__download
	rm subversion-deps-$svn.tar.bz2.*
fi
if [ ! -f $dev/subversion-$svn/__download ] ; then
	rm subversion-$svn.tar.bz2*
	wget http://subversion.tigris.org/downloads/subversion-$svn.tar.bz2 &amp;&amp; \
		tar -xjf subversion-$svn.tar.bz2 &amp;&amp; \
		touch  subversion-$svn/__download
	rm subversion-$svn.tar.bz2*
fi
&nbsp;
&nbsp;
export o=&quot; --prefix=$ipath LDFLAGS=&quot;-L$ipath/lib&quot; CPPFLAGS=&quot;-I$ipath/include&quot; CFLAGS=&quot;-I$ipath/include&quot; &quot;
export oapr=&quot; --with-apr=$ipath/bin/apr-1-config &quot;
export oapu=&quot; --with-apr-util=$ipath/bin/apu-1-config &quot;
&nbsp;
export pdep=$dev/subversion-deps-$svn
export psvn=$dev/subversion-$svn
&nbsp;
export PATH=$ipath/bin:$PATH
&nbsp;
#compile zlib
cd $pdep/zlib
export CFLAGS='-fPIC'
if [ ! -f _done ] ; then
	make clean
	./configure --prefix=$ipath
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile APR
cd $pdep/apr
if [ ! -f _done ] ; then
	make clean
	./configure $o
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile neon
cd $pdep/neon
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;&amp; touch _done
fi
make install
&nbsp;
#compile sqlite
cd $pdep/sqlite-amalgamation
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile Berkeley DB
cd $pdep
if [ ! -f db-5.0.21/__download ] ; then
	rm db-5.0.21.tar.gz*
	wget http://download.oracle.com/berkeley-db/db-5.0.21.tar.gz &amp;&amp; \
		tar -xzf db-5.0.21.tar.gz &amp;&amp; \
		touch  db-5.0.21/__download
	rm db-5.0.21.tar.gz*
fi
cd $pdep/db-5.0.21/build_unix
if [ ! -f _done ] ; then
	make clean
	../dist/configure $o $oapr
	make &amp;&amp; touch _done
fi
make install
&nbsp;
&nbsp;
# compile APR-util after Berkeley. This way svn find berkeley automatically
cd $pdep/apr-util
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr --with-berkeley-db=$ipath/include:$ipath/lib
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile serf
cd $pdep/serf
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr $oapu
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# finaly, build svn
cd $psvn
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;&amp; touch _done
fi
make install</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FBJS Slider Carousel</title>
		<link>http://thinkclay.com/tutorial/fbjs-slider-carousel</link>
		<comments>http://thinkclay.com/tutorial/fbjs-slider-carousel#comments</comments>
		<pubDate>Tue, 13 Apr 2010 04:50:25 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[FBJS]]></category>
		<category><![CDATA[front-end]]></category>
		<category><![CDATA[JS]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1325</guid>
		<description><![CDATA[I&#8217;ve made a nice little FBJS Slider that I use quite often for animation within facebook. I hope that little snippets and code like this will help other developers make more interested and appealing Facebook applications, like we do at Room 214 currently. First with the styling #slideWrap creates an extremely wide canvas for the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made a nice little <strong>FBJS Slider</strong> that I use quite often for animation within facebook. I hope that little snippets and code like this will help other developers make more interested and appealing Facebook applications, like we do at <a href="http://room214.com">Room 214</a> currently.</p>
<h3>First with the styling</h3>
<p>#slideWrap creates an extremely wide canvas for the slide to fit on aligned horizontally.<br />
#wrapper then creates a sort of viewport to view the slides through.</p>
<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
<span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">520px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#slideWrap</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">9000px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.slide</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">520px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#wrapper</span> <span style="color: #cc00cc;">#slideNav</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-2.75em</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">2em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
	<span style="color: #cc00cc;">#slideNav</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li a <span style="color: #00AA00;">&#123;</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; font-style: italic;">http://cmcilrath.rssready.net/xcel/assets/images/bg_slideNav.png?v=3</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">-12px</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</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: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">.5em</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-999em</span><span style="color: #00AA00;">;</span>
			<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
		<span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li a<span style="color: #6666ff;">.next</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#slideNav</span> li a<span style="color: #6666ff;">.prev</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li a<span style="color: #6666ff;">.selected</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-12px</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#prevSlide</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#prevSlide</span> a<span style="color: #6666ff;">.disabled</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#nextSlide</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
		<span style="color: #cc00cc;">#slideNav</span> li<span style="color: #cc00cc;">#nextSlide</span> a<span style="color: #6666ff;">.disabled</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></div>
<h3>The FBJS script</h3>
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>
<span style="color: #003366; font-weight: bold;">function</span> Each<span style="color: #009900;">&#40;</span>array<span style="color: #339933;">,</span> block<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</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><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> l <span style="color: #339933;">=</span> array.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>l<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		block<span style="color: #009900;">&#40;</span>array<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><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: #003366; font-weight: bold;">var</span> currentSlide <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> maxSlides <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> animating <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> slideWidth <span style="color: #339933;">=</span> <span style="color: #CC0000;">520</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> currentPX <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> nextSlide<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> nextSlideNum <span style="color: #339933;">=</span> currentSlide <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>nextSlideNum <span style="color: #339933;">&gt;=</span> maxSlides<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>nextSlideNum <span style="color: #339933;">==</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">&amp;&amp;</span> currentSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	currentSlide <span style="color: #339933;">=</span> nextSlideNum<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>animating <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</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;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> prevSlide<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> prevSlideNum <span style="color: #339933;">=</span> currentSlide <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>prevSlideNum <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentSlide <span style="color: #339933;">==</span> maxSlides<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	currentSlide <span style="color: #339933;">=</span> prevSlideNum<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>animating <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</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;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> toggleButton<span style="color: #009900;">&#40;</span>button<span style="color: #339933;">,</span>state<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'next'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'disable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nextSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;next disabled&quot;&gt;next slide &amp;gt;&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>nextSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'next'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nextSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;next&quot;&gt;next slide &amp;gt;&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>nextSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'prev'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'disable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prevSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;prev disabled&quot;&gt;&amp;lt; previous slide&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>prevSlide<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>button <span style="color: #339933;">==</span> <span style="color: #3366CC;">'prev'</span> <span style="color: #339933;">&amp;&amp;</span> state <span style="color: #339933;">==</span> <span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prevSlide'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setInnerXHTML</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;a href=&quot;#&quot; class=&quot;prev&quot;&gt;&amp;lt; previous slide&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span>prevSlide<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: #003366; font-weight: bold;">function</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span>direction<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	Each<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slideNav&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">as</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">as</span>.<span style="color: #660066;">removeClassName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slideNav-&quot;</span><span style="color: #339933;">+</span>currentSlide<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClassName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	animating <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> pixelShift <span style="color: #339933;">=</span> slideWidth <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>currentSlide<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: #003366; font-weight: bold;">var</span> startingSlideNum <span style="color: #339933;">=</span> currentSlide<span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> Slide_container <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'slideWrap'</span><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>direction <span style="color: #339933;">==</span> <span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		Animation<span style="color: #009900;">&#40;</span>Slide_container<span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span>currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">duration</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ease</span><span style="color: #009900;">&#40;</span>Animation.<span style="color: #660066;">ease</span>.<span style="color: #660066;">both</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">checkpoint</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>startingSlideNum <span style="color: #339933;">==</span> currentSlide<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> animating<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</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: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">go</span><span style="color: #009900;">&#40;</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;">if</span><span style="color: #009900;">&#40;</span>direction <span style="color: #339933;">==</span> <span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		Animation<span style="color: #009900;">&#40;</span>Slide_container<span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #339933;">,</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span>currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">by</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> pixelShift <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">from</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'-'</span> <span style="color: #339933;">+</span> currentPX <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span>
			.<span style="color: #660066;">duration</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ease</span><span style="color: #009900;">&#40;</span>Animation.<span style="color: #660066;">ease</span>.<span style="color: #660066;">both</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">checkpoint</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>startingSlideNum <span style="color: #339933;">==</span> currentSlide<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> animating<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</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: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">go</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	currentPX <span style="color: #339933;">=</span> pixelShift<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showSlide<span style="color: #009900;">&#40;</span>num<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	startingSlide <span style="color: #339933;">=</span> currentSlide<span style="color: #339933;">;</span>
	currentSlide <span style="color: #339933;">=</span> num<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">&gt;</span> startingSlide<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>num <span style="color: #339933;">&lt;</span> startingSlide<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">scroll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>startingSlide <span style="color: #339933;">==</span> maxSlides <span style="color: #339933;">&amp;&amp;</span> currentSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentSlide <span style="color: #339933;">==</span> maxSlides <span style="color: #339933;">&amp;&amp;</span> startingSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentSlide <span style="color: #339933;">==</span> maxSlides<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'disable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>startingSlide <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'prev'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>startingSlide <span style="color: #339933;">==</span> maxSlides<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> toggleButton<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'next'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'enable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">//--&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>
<h3>FBML Markup</h3>
<p>Simple markup here, slideNav controls the slide with onclicks, the JS does the magic.</p>
<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;div id=&quot;wrapper&quot;&gt;
	&lt;h2&gt;Header&lt;/h2&gt;
	&lt;ul id=&quot;slideNav&quot;&gt;
		&lt;li id=&quot;prevSlide&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;prev disabled&quot;&gt;&amp;lt; previous slide&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-1&quot; onclick=&quot;showSlide(1); return false;&quot; class=&quot;selected&quot;&gt;1&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-2&quot; onclick=&quot;showSlide(2); return false;&quot;&gt;2&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-3&quot; onclick=&quot;showSlide(3); return false;&quot;&gt;3&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-4&quot; onclick=&quot;showSlide(4); return false;&quot;&gt;4&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slideNav-5&quot; onclick=&quot;showSlide(5); return false;&quot;&gt;5&lt;/a&gt;&lt;/li&gt;
		&lt;li id=&quot;nextSlide&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;next&quot; onclick=&quot;nextSlide(); return false;&quot;&gt;&amp;gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;div id=&quot;slideWrap&quot;&gt;
        &lt;div id=&quot;slide_1&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 1&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_2&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 2&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_3&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 3&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_4&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 4&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
&nbsp;
        &lt;div id=&quot;slide_5&quot; class=&quot;slide&quot;&gt;
			&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;Title 5&lt;/a&gt;&lt;/h3&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;/div&gt;
	&lt;/div&gt;
	&lt;!-- end slideWrap --&gt;
&lt;/div&gt;</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/tutorial/fbjs-slider-carousel/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Installing Zend Framework on MAMP</title>
		<link>http://thinkclay.com/technology/installing-zend-framework-on-mamp</link>
		<comments>http://thinkclay.com/technology/installing-zend-framework-on-mamp#comments</comments>
		<pubDate>Wed, 09 Dec 2009 03:23:28 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[zend]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1209</guid>
		<description><![CDATA[As usual, I'm sharing a solution a problem that I personally encountered and couldn't find a great solution for. So I've been using my laptop more and more as my local development environment in order to keep things private and secure while in the dev stage. Among learning how to fully utilize SVN locally, I've been trying to setup my laptop to be a fully functional server while also being extremely easy to maintain and change my environment on the fly. To do this, I'm running MAMP (Mac Apache MySQL PHP) available for free at <a href="http://mamp.info">mamp.info</a> as well as the Zend Framework bundled with Zend Tool. ]]></description>
			<content:encoded><![CDATA[<p>As usual, I&#8217;m sharing a solution a problem that I personally encountered and couldn&#8217;t find a great solution for. So I&#8217;ve been using my laptop more and more as my local development environment in order to keep things private and secure while in the dev stage. Among learning how to fully utilize SVN locally, I&#8217;ve been trying to setup my laptop to be a fully functional server while also being extremely easy to maintain and change my environment on the fly. To do this, I&#8217;m running MAMP (Mac Apache MySQL PHP) available for free at <a href="http://mamp.info">mamp.info</a> as well as the <strong>Zend Framework</strong> bundled with <strong>Zend Tool</strong>. </p>
<ol>
<li>Get MAMP up and running, no special setup is needed here.</li>
<li>Download <a href="http://framework.zend.com/download/latest">Zend Framework</a> and place it wherever you&#8217;d like. I actually retrieved my copy via SVN so that I can easily upgrade it later. To do this open up terminal and follow these commands:
<pre>
cd /Applications/MAMP/
mkdir svn
cd svn
mkdir zendframework
cd zendframework
svn checkout http://framework.zend.com/svn/framework/standard/trunk
</pre>
</li>
<li>Now open your php.ini file located under <em>/Applications/MAMP/conf/php5/php.ini</em></li>
<li>Search for <strong>include_path</strong> (around line 411 on mine) and add the location of your zend framework:
<pre>include_path = ".:/usr/lib/php:/usr/local/lib/php:/Applications/MAMP/svn/zendframework/trunk/library"</pre>
<p>Make sure to include the <em>library</em> directory otherwise you&#8217;ll <strong>get a blank page in Zend Framework</strong>
</li>
<li>Zend Framework also comes with a shell script that will help you with RAD (Rapid Application Deployment), you can create a shortcut to Zend Tools in terminal by adding an alias to your profile under /etc/profile (thanks DS for pointing this out) and make sure to restart terminal after you&#8217;ve done so:
<pre>alias zf=/Applications/MAMP/svn/zendframework/trunk/bin/zf.sh</pre>
</li>
<li>Test if the Zend Tool is installed correctly by showing the version:
<pre>zf show version</pre>
</li>
<li>Finally navigate to the directory you&#8217;d like to create your first project in:
<pre>cd /Applications/MAMP/htdocs/</pre>
<p>and with Zend Tool creating a project is simple:</p>
<pre>zf create project test</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/installing-zend-framework-on-mamp/feed</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Flash Basics: Part 1</title>
		<link>http://thinkclay.com/creativity/flash-basics-part-1</link>
		<comments>http://thinkclay.com/creativity/flash-basics-part-1#comments</comments>
		<pubDate>Wed, 27 May 2009 05:30:19 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[digital art]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[front-end]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=963</guid>
		<description><![CDATA[<div class="alignleft" style="padding-right: 2em;"><object height="145" width="300" type="application/x-shockwave-flash" data="http://thinkclay.com/wp-content/uploads/2009/05/bubbles.swf" id="swfceb51" style="visibility: visible;"><param name="wmode" value="window"/><param name="menu" value="false"/><param name="quality" value="high"/><param name="bgcolor" value="#FFFFFF"/></object>
<script type="text/javascript">
	swfobject.embedSWF("http://thinkclay.com/wp-content/uploads/2009/05/bubbles.swf", "swfceb51", "300", "145", "9.0.0", "", {}, {wmode: "window", menu: "false", quality: "high", bgcolor: "#FFFFFF"}, {});
</script></div>A tutorial and explanation of Adobe Flash basics, understanding palletes and layout of the program. This tutorial will also walk step-by-step through actionscript and how actionscript is integrated into a flash animation using symbols and objects.]]></description>
			<content:encoded><![CDATA[<p>
<object width="490" height="237">
<param name="movie" value="http://thinkclay.com/wp-content/uploads/2009/05/bubbles.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="490" height="237" src="http://thinkclay.com/wp-content/uploads/2009/05/bubbles.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>For too long I&#8217;ve put off learning Flash because I never liked the layout of the program, but I decided today that like it or not, flash is a very popular front-end development tool. Being a front-end developer it&#8217;s important to know every tool and technology to some extent and understand the inner workings of each technology and how to integrate them with other markup and programming. So let&#8217;s dive into some screenshots and descriptions and learn Adobe Flash.</p>
<h2>Getting to know the program</h2>
<p><a href="http://thinkclay.com/creativity/flash-basics-part-1/attachment/screenshot-palletes" rel="attachment wp-att-971"><img src="http://thinkclay.com/wp-content/uploads/2009/05/screenshot-palletes-640x360.jpg" alt="Flash Layout" title="Screenshot with Descriptions of Flash Palletes" width="490" /></a></p>
<h2>Create a new Flash File (Actionscript 3.0)</h2>
<ul>
<li>Create a new Flash File by going to File > New > Flash File (Actionscript 3.0)</li>
<li>Change the document size and frame rate to your liking (Modify > Document), I used 640 x 310 and 18 fps</li>
<li>Use the Rectangle tool and draw a rectangle on Layer 1 with the color you&#8217;d like</li>
<li>Create any other layers or draw any other objects or place text. I created a text object on top of the rectangle</li>
<li>Name &#8220;Layer 1&#8243; to &#8220;Background&#8221; and create a new layer named &#8220;Code&#8221;</li>
<li>Save the Document</li>
</ul>
<h2>Create a new Actionscript File</h2>
<p><a href="http://thinkclay.com/creativity/flash-basics-part-1/attachment/new-actionscript-file" rel="attachment wp-att-974"><img src="http://thinkclay.com/wp-content/uploads/2009/05/new-actionscript-file-640x360.jpg" alt="Create a new Actionscript File" title="Create a new Actionscript File" width="490" /></a></p>
<h3>Paste in the code</h3>
<p><a href="http://thinkclay.com/creativity/flash-basics-part-1/attachment/paste-code" rel="attachment wp-att-975"><img src="http://thinkclay.com/wp-content/uploads/2009/05/paste-code-640x360.jpg" alt="Paste in the Code" title="Paste in the Actionscript Code" width="490" /></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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/* Blurry Lights Animation */</span>
&nbsp;
<span style="color: #9900cc; font-weight: bold;">package</span> Classes
<span style="color: #000000;">&#123;</span>
	<span style="color: #3f5fbf;">/* Import required classes */</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">MovieClip</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.filters</span>.<span style="color: #004993;">BitmapFilter</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.filters</span>.<span style="color: #004993;">BlurFilter</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Lights extends <span style="color: #004993;">MovieClip</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #3f5fbf;">/* Vars */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> lightsNumber<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> xSpeed<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ySpeed<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> lightsDir<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> areaW<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> areaH<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> lights<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
		<span style="color: #3f5fbf;">/* Main function */</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span>areaWidth<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, areaHeight<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, numberOfLights<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, lightSize<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, lightColor<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">uint</span>, minimumScale<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>, hSpeed<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, vSpeed<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, dir<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>, <span style="color: #004993;">quality</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #3f5fbf;">/* Set variables */</span>
			areaW = areaWidth;
			areaH = areaHeight;
			lightsNumber = numberOfLights;
			lightsDir = dir;
&nbsp;
			<span style="color: #3f5fbf;">/* Use a for to create the parameter-specified number of lights*/</span>
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> numberOfLights; i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #3f5fbf;">/* Create the specified number of lights */</span>
&nbsp;
				<span style="color: #6699cc; font-weight: bold;">var</span> light<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">MovieClip</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Set random speed to x and y based on the params*/</span>
&nbsp;
				xSpeed = <span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span>hSpeed <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000; font-weight: bold;">-</span>hSpeed <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000; font-weight: bold;">-</span>hSpeed<span style="color: #000000;">&#41;</span>;
				ySpeed = <span style="color: #004993;">Math</span>.<span style="color: #004993;">round</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> vSpeed<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">0.5</span><span style="color: #000000;">&#41;</span>;
&nbsp;
				light.xSpeed = xSpeed;
				light.ySpeed = ySpeed;
&nbsp;
				<span style="color: #3f5fbf;">/* Create lights */</span>
&nbsp;
				light.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>lightColor<span style="color: #000000;">&#41;</span>;
				light.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">drawCircle</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #000000; font-weight:bold;">0</span>, lightSize <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				light.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Set a position based on the params specified */</span>
&nbsp;
				light.<span style="color: #004993;">x</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> areaWidth<span style="color: #000000;">&#41;</span>;
				light.<span style="color: #004993;">y</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> areaHeight<span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Add blur, we declare the var here to get a new blur w/every light */</span>
&nbsp;
				<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">b</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">5</span>;
&nbsp;
				<span style="color: #6699cc; font-weight: bold;">var</span> blur<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">BitmapFilter</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BlurFilter</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">b</span>,<span style="color: #004993;">b</span>,<span style="color: #004993;">quality</span><span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #6699cc; font-weight: bold;">var</span> filterArray<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span>blur<span style="color: #000000;">&#41;</span>;
&nbsp;
				light.<span style="color: #004993;">filters</span> = filterArray;
&nbsp;
				<span style="color: #3f5fbf;">/* Change alpha */</span>
&nbsp;
				light.<span style="color: #004993;">alpha</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">0.6</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">0.1</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Scale */</span>
&nbsp;
				light.<span style="color: #004993;">scaleX</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">round</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000000; font-weight: bold;">-</span> minimumScale<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> minimumScale<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">100</span>;
				light.<span style="color: #004993;">scaleY</span> = light.<span style="color: #004993;">scaleX</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Add the lights */</span>
&nbsp;
				<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>light<span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Store lights in an array to use it later */</span>
&nbsp;
				lights.<span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>light<span style="color: #000000;">&#41;</span>;
&nbsp;
				<span style="color: #3f5fbf;">/* Check for lights direction */</span>
&nbsp;
				checkDirection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #3f5fbf;">/* Check direction */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> checkDirection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> lights.<span style="color: #004993;">length</span>; i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">switch</span> <span style="color: #000000;">&#40;</span> lightsDir <span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;up&quot;</span> <span style="color: #000000; font-weight: bold;">:</span>
&nbsp;
						lights<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>, moveUp<span style="color: #000000;">&#41;</span>;
&nbsp;
						<span style="color: #0033ff; font-weight: bold;">break</span>;
					<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;down&quot;</span> <span style="color: #000000; font-weight: bold;">:</span>
&nbsp;
						lights<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>, moveDown<span style="color: #000000;">&#41;</span>;
&nbsp;
						<span style="color: #0033ff; font-weight: bold;">break</span>;
					<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;right&quot;</span> <span style="color: #000000; font-weight: bold;">:</span>
&nbsp;
						lights<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>, moveRight<span style="color: #000000;">&#41;</span>;
&nbsp;
						<span style="color: #0033ff; font-weight: bold;">break</span>;
					<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #990000;">&quot;left&quot;</span> <span style="color: #000000; font-weight: bold;">:</span>
&nbsp;
						lights<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">ENTER_FRAME</span>, moveLeft<span style="color: #000000;">&#41;</span>;
&nbsp;
						<span style="color: #0033ff; font-weight: bold;">break</span>;
					<span style="color: #0033ff; font-weight: bold;">default</span> <span style="color: #000000; font-weight: bold;">:</span>
&nbsp;
						<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Something weird just happened!&quot;</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #3f5fbf;">/* Move Up function */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> moveUp<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span>= e.<span style="color: #004993;">target</span>.xSpeed;
			e.<span style="color: #004993;">target</span>.y<span style="color: #000000; font-weight: bold;">-</span>=e.<span style="color: #004993;">target</span>.ySpeed;
&nbsp;
			<span style="color: #3f5fbf;">/* Reset light position, Y first, then X  */</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> = areaH <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span>=<span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaW<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">-</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> areaW<span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> = areaH <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span>=<span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaW<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #3f5fbf;">/* Move Down function */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> moveDown<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span><span style="color: #000000; font-weight: bold;">+</span>=e.<span style="color: #004993;">target</span>.xSpeed;
			e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span><span style="color: #000000; font-weight: bold;">+</span>=e.<span style="color: #004993;">target</span>.ySpeed;
&nbsp;
			<span style="color: #3f5fbf;">/* Reset light position, Y first, then X */</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> areaH<span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span>=<span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaW<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">-</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> areaW<span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> = areaH <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span>=<span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaW<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #3f5fbf;">/* Move Right function */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> moveRight<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span><span style="color: #000000; font-weight: bold;">+</span>=e.<span style="color: #004993;">target</span>.ySpeed;
			e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span><span style="color: #000000; font-weight: bold;">+</span>=e.<span style="color: #004993;">target</span>.xSpeed;
&nbsp;
			<span style="color: #3f5fbf;">/* Reset light position, Y first, then X */</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> areaH <span style="color: #000000; font-weight: bold;">||</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaH<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">-</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> areaW<span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaW<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #3f5fbf;">/* Move Left function */</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> moveLeft<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			e.<span style="color: #004993;">target</span>.x<span style="color: #000000; font-weight: bold;">-</span>=e.<span style="color: #004993;">target</span>.ySpeed;
			e.<span style="color: #004993;">target</span>.y<span style="color: #000000; font-weight: bold;">-</span>=e.<span style="color: #004993;">target</span>.xSpeed;
&nbsp;
			<span style="color: #3f5fbf;">/* Reset light position, Y first, then X */</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> areaH <span style="color: #000000; font-weight: bold;">||</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">height</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> = areaW <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span>=<span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaH<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> <span style="color: #000000; font-weight: bold;">+</span> e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">x</span> = areaW <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">width</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
				e.<span style="color: #004993;">target</span>.<span style="color: #004993;">y</span>=<span style="color: #004993;">Math</span>.<span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>areaW<span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>
<ul>
<li>Note the line &#8220;package Classes&#8221; near the top. This is the name of the folder that will contain your class file. Make sure you have this folder in the same directory as your other flash file and that the name of the folder matches the name of the package.</li>
<li>Save the file inside your &#8220;Classes&#8221; directory</li>
</ul>
<h3>Add your Actions to your Flash File</h3>
<p>You&#8217;ve created the ActionScript file and <em>Lights</em> class, now all you need to do is call that class and pass the parameters to the script. Do this by going to Window > Actions and pasting in the code. Save and preview / publish and you&#8217;re done!</p>
<p><a href="http://thinkclay.com/creativity/flash-basics-part-1/attachment/flash-actions-properties" rel="attachment wp-att-976"><img src="http://thinkclay.com/wp-content/uploads/2009/05/flash-actions-properties-640x360.jpg" alt="Window &gt; Actions" title="Flash - Add your actions to your flash document" width="490" /></a></p>
<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> Classes.Lights;
&nbsp;
  <span style="color: #6699cc; font-weight: bold;">var</span> light<span style="color: #000000; font-weight: bold;">:</span>Lights = <span style="color: #0033ff; font-weight: bold;">new</span> Lights<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
  light.<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">640</span>, <span style="color: #000000; font-weight:bold;">310</span>, <span style="color: #000000; font-weight:bold;">10</span>, <span style="color: #000000; font-weight:bold;">300</span>, 0xFFFFFF, <span style="color: #000000; font-weight:bold;">0.5</span>, <span style="color: #000000; font-weight:bold;">1</span>, <span style="color: #000000; font-weight:bold;">1</span>, <span style="color: #990000;">&quot;up&quot;</span>, <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
&nbsp;
  <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>light<span style="color: #000000;">&#41;</span>;</pre></div></div>
<h2>Want more?</h2>
<p><a href="http://flash.tutsplus.com/tutorials/effects/create-a-whimsical-animated-flash-background/">Read more of the programming side</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/creativity/flash-basics-part-1/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Design a Logo &#8211; Pt1: Branding</title>
		<link>http://thinkclay.com/creativity/how-to-design-a-logo-branding</link>
		<comments>http://thinkclay.com/creativity/how-to-design-a-logo-branding#comments</comments>
		<pubDate>Sun, 25 Jan 2009 07:57:59 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[digital art]]></category>
		<category><![CDATA[graphic design]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=598</guid>
		<description><![CDATA[Many people want to know how to design a logo from start to finish. Let me address first, that logo design is not something that should be taken lightly and doesn’t come cheap. Not everyone can be as fortunate as Nike and get an effective logo for only $35. In fact, designing a highly effective [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bychosen.com" title="web design" rel="external"><img src="http://thinkclay.com/wp-content/uploads/2009/01/how-design-logo-580x145.jpg" alt="how to design a logo" title="how design logo" width="490" /></a></p>
<p>Many people want to know <strong>how to design a logo</strong> from start to finish. Let me address first, that <strong>logo design</strong> is not something that should be taken lightly and doesn’t come cheap. Not everyone can be as fortunate as Nike and get an effective logo for only $35. In fact, designing a highly effective logo takes expertise in many fields including <strong>advertising</strong>, <strong>marketing</strong>, and <strong>design</strong>.</p>
<p>This post is intended to help young and ambitious designers with resources to research, conceptualize, and design a logo.  If you’re a business looking to hire a logo designer, you can hire me through my <a title="Graphic Design Company" href="http://chosencreative.com">graphic design company</a>, which offers full <strong>company branding</strong> as well as <a title="Internet Marketing" href="http://bychosen.com">internet marketing</a> and advertising.</p>
<h3>Identify and Brainstorm</h3>
<p>Before getting into the concept stage of logo design, you must first identify <strong>who</strong> your client is, <strong>what</strong> branding (if any) they have, and what <strong>demographic</strong> their business is targeting. These are all going to be crucial to the design and development of a logo.</p>
<p>To get started with the tools you’ll need to design, you need to identify the colors, fonts, icons, and images that will best represent the client. If they have a brand already you won’t have much difficulty doing this. However, if you’re starting from scratch, you’ll need to do some research just to setup your workspace in photoshop or illustrator.</p>
<h4>Logo Color</h4>
<p>Start with a color scheme and browse around for a while on <a href="http://www.colourlovers.com/">colourlovers.com</a> and ask yourself while you browse <em>what is the demographic the client is targeting</em>? I usually go by age, sex, and location to get started.</p>
<h5>Age</h5>
<p><a style="float:left; padding-right: 1em;" href="http://www.colourlovers.com/palette/683740/Children_and_Babies"><img title="children and babies color pallete" src="http://thinkclay.com/wp-content/uploads/2009/01/children_and_babies.png" alt="Advertise to children and parents" width="228" height="25" /></a><strong>Targeting Young Children and Parents</strong><br />
<small>Start by looking at pastel colors (soft, chalky colors), because babies and children are viewed as fragile and gentle.</small></p>
<p><a style="clear:left; float:left; padding-right: 1em;" href="http://www.colourlovers.com/palette/683743/Typical_Teens"><img title="typical teens" src="http://thinkclay.com/wp-content/uploads/2009/01/typical_teens.png" alt="Advertise to teenagers and children" width="228" height="25" /></a><strong>Targeting Children and Teenagers</strong><br />
<small>Try heavy contrasts (neon pinks, greens, blues,  black), just look at any typical teenager&#8217;s myspace and you&#8217;ll see what I mean</small></p>
<p><a style="clear:left; float:left; padding-right: 1em;" href="http://www.colourlovers.com/palette/683745/Young_Adults"><img title="young adults" src="http://thinkclay.com/wp-content/uploads/2009/01/young_adults.png" alt="Advertise to Young Adults" width="228" height="25" /></a><strong>Targeting Young Adults</strong><br />
<small>Try the primary colors with different lightness/darkness and contrast (light blue and white on dark blue for example)</small></p>
<p><a style="clear:left; float:left; padding-right: 1em;" href="http://www.colourlovers.com/palette/683748/Elderly"><img title="Middle Aged and Elderly Adults" src="http://thinkclay.com/wp-content/uploads/2009/01/elderly.png" alt="Advertise to Middle Aged Adults and Elderly" width="228" height="25" /></a><strong>Targeting Middle Aged Adults and Older</strong><br />
<small>Try soft and dark (beige, grays, retro). Pretty much match the style that was popular when they were young adults</small></p>
<h5>Location</h5>
<p>Then look at demographic by location to determine an even narrower selection of colors, often times you have to think backwards of what society has taught you, and stereotype people. Cultures can be very different and have different trends and styles that are attractive. Compare Japan to the US for example, and you’ll see a huge difference in color preference and design.</p>
<h4>Logo Shape</h4>
<p>Next identify iconography. This is actually easiest to do with finding words that relate to the client. For example, pretend Nike needed a brand and the “swoosh” didn’t exist. In this phase I would identify words that relate to their business to use as a base for iconography:</p>
<h5>Words Relating to the Company Name and Services:</h5>
<ul>
<li>Running / Movement / Fast / Motion</li>
<li>Sports / Tennis / Soccer / Football / Basketball / Baseball / Hockey</li>
<li>Greek Gods / Victory / Active / Fast / Strength</li>
<li>Shoes / Shirts / Apparel / Equipment</li>
</ul>
<p>Finally identify font. Typography for a business is almost as important or sometimes IS the logo design. Occasionally this phase comes AFTER the logo design, but if it’s easy to identify in the beginning then do so.</p>
<p>Check back in to read the next part of the series <strong>How to Design a Logo</strong>, which will cover the actual <strong>Logo Design</strong>. For more reading on logo design, check out <a href="http://justcreativedesign.com/2008/01/08/how-to-design-a-logo/">How to design a logo</a> by Jacob Cass.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/creativity/how-to-design-a-logo-branding/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to download with Torrents</title>
		<link>http://thinkclay.com/technology/how-to-download-with-torrents</link>
		<comments>http://thinkclay.com/technology/how-to-download-with-torrents#comments</comments>
		<pubDate>Sat, 10 Jan 2009 10:18:26 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[personal]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=466</guid>
		<description><![CDATA[This post aims to help its readers understand media downloading in our current generation of torrents and help make aware the risks and best tactics to download media. Please note that everything discussed in this article IS illegal in many countries, but like many users, you probably already know that Kazaa and Limewire are DEAD [...]]]></description>
			<content:encoded><![CDATA[<p>This post aims to help its readers understand media downloading in our current generation of torrents and help make aware the risks and best tactics to download media. Please note that everything discussed in this article IS illegal in many countries, but like many users, you probably already know that</p>
<h3>Kazaa and Limewire are DEAD</h3>
<p>It&#8217;s amazing to me how many people are still using the old method <strong>(pure) Peer to Peer (P2P)</strong> which connects a user directly to other users to download software, music, movies, and other media. Peer-to-peer applications such as <strong>limewire</strong>, <strong>kazaa</strong>, <strong>morpheus</strong>, <strong>ares</strong>, and others, were popular through the late 80&#8242;s and early 00&#8242;s. Many people still recognize and remember these popular names of programs and when they decide they want to download a song, they often go looking for what they know. But using these legacy programs could cost you.. a lot. I&#8217;m sure everyone reading this post has heard of the Music Industry&#8217;s attack on downloading and P2P as it&#8217;s been all over the news for the last few years. These media industries are finding and suing individuals for downloading media illegally and the easiest way for them to execute these <em>seek-and-destroy lawsuits</em> is to use a rapid spread environment like <strong>legacy P2P</strong> applications (to classify legacy, I&#8217;m referring to 1st-3rd generation P2P). Let me give you a hypothetical which is the most common model for these <em>seek-and-destroy lawsuits</em> to use:</p>
<blockquote><p>You hear a song on the radio that you really want. It&#8217;s a very popular song and you know you&#8217;ve seen it all over the net, but haven&#8217;t been able to find a site to download it from for free. You know that you could probably download it the way your friends have been doing it for years.. let&#8217;s think.. well, you don&#8217;t know much about how they download, but you know they use a program called limewire. Or maybe you even used limewire a few years ago, but stopped for whatever reason for a time.</p>
<p>So you google and find a copy of limewire to download and install. You run it and search for the song. Minutes later your song appears to be downloaded and working just fine. It&#8217;s shows a full 3 minutes or so, and even the file size seems to be a normal mp3 size. Let&#8217;s pretend you even go one step further to be safe and run a virus scan, and the file appears to be okay. So you open it up in your music player, and nothing plays, it&#8217;s just blank. You mess around with it for a bit, and then give up and delete it, thinking it must just be a dud.</p></blockquote>
<p>Stop the hypothetical. What you just did was download a <strong>trojan</strong>, a file that appears harmless but opens a &#8220;back door&#8221; on your computer allowing someone to enter in silently. Many media industries now have the right to compromise your computer and then scan and find just how many files are illegally downloaded on their. They gave them this right by downloading and opening that music file. You knew it wasn&#8217;t legal, but you did it anyway. That&#8217;s all the justification that empowers them to come at you and sue you for all the music you own illegally. This has happened to a large number of legacy P2P users and is still happening in the present. It&#8217;s no joke, and it&#8217;s something to be worried about.</p>
<h3>But there&#8217;s hope.. say hello to Torrents</h3>
<p>Bram Cohen invented a technology called BitTorrent in 2001 which allowed for P2P to become a safe place again. BitTorrent is a P2P file-sharing protocol used to distribute large amounts of data in smaller segments and is one of the most common protocols for file transfer. By some estimates BitTorrent accounts for almost 50% of all traffic on the entire Internet <a href="http://www.bit-tech.net/news/2008/06/25/45-percent-of-all-traffic-is-p2p/1">[source]</a>. On top of that, <strong>isoHunt</strong> estimates the total amount of content/media is currently more than 1.2 petabytes. Those numbers are frightening to some and encouraging to others, take it as you will.</p>
<h3>How BitTorrent works</h3>
<p>Torrents start first with a <strong>seed</strong>. The initial distributor of the file(s) acts as the first seed. Each peer who downloads the seed also <strong>uploads them in segments</strong> to other peers, which allows for a highly efficient transferring across many users. Picture torrents as a puzzle, a <strong>minimum of one completed puzzle or seed</strong> is needed to begin spreading the pieces among thousands of users/peers and the addition of <strong>more seeds increases the likelihood of a successful connection</strong> exponentially. This meaning that if out of 3 peers you are PERSON A and you need PIECE 3, if PERSON B doesn&#8217;t have it, you check another peer. Once you find one, such as PERSON C, you can then retrieve that piece from that peer. Once all the pieces are retrieved, your application completes the puzzle and you have a final result of the file you were trying to attain. Relative to standard Internet hosting, this provides a significant reduction in the original distributor&#8217;s hardware and bandwidth resource costs as well as provides redundancy against system problems and reduces dependence on the original distributor. From a legal standpoint this has advantages as well, because rather than downloading <em>song.mp3</em> which is clearly a music file, you are instead simply downloading <em>segments of data</em>, which can be argued in court on whether those segments make song.mp3 or are simply random bits of data that could make anything. I&#8217;m sure this would make sense why it would be harder for the media to inject their Trojan Files as well.</p>
<h3>So am I safe using torrents?</h3>
<p>While torrents aren&#8217;t completely safe from the media, they are even less safe from viruses. Don&#8217;t misunderstand me in that statement, however, because torrents are still quite a bit safer than the legacy methods of P2P. The original seeder can still inject a virus or trojan into whatever file they&#8217;re sharing, so it&#8217;s best to read comments or information about the tracker/seed and see what others are saying. Generally if it&#8217;s had a few downloads, it will also have a few comments and peers are your best defense. Overall torrents are the 4 generation of P2P file sharing, and are much safer than old methods.</p>
<h3>I feel good about it, where do I go now</h3>
<p>There are many torrent applications out there as well as many torrent search engines. I&#8217;m going to provide my bias opinions in my recommendations, but here is a <a href="http://netforbeginners.about.com/od/peersharing/f/torrentclients.htm">non-bias torrent software listing</a>. </p>
<h4><a href="http://vuze.com" title="Vuze Torrent Software">Vuze</a></h4>
<p>Vuze (formerly know as &#8220;azureus&#8221;) is a cross-platform torrent application that installs if JAVA is enabled. It may be slightly slower than other applications for initial load times and memory used, but for the average user, it&#8217;s well worth it for a better interface and built in search functionality that will most likely eliminate your need to search anywhere else.</p>
<h4><a href="http://utorrent.com" title="uTorrent Torrent Software">uTorrent</a></h4>
<p>Known as both &#8220;u-torrent&#8221; and &#8220;micro torrent&#8221;, this is the most popular torrent tool today. uTorrent is lightweight and fast, however is limited to Windows. While many prefer uTorrent, I find it to be a little less than Vuze.</p>
<h4><a href="bitcomet.com" title="BitComet Torrent Software">BitComet</a></h4>
<p>This application used to be my favorite, and it&#8217;s still up there, but it&#8217;s just doesn&#8217;t stand-up to how lightweight and simplistic uTorrent is.</p>
<h3>Torrent Search Engines</h3>
<p>If you&#8217;re having trouble finding a torrent, you can always manually look in different torrent search engines. Here are the best ones according to <a href="http://netforbeginners.about.com/od/peersharing/f/torrentclients.htm">about.com</a>:</p>
<ul>
<li><strong>Special Mention</strong>: <a href="http://spiralfrog.com">SpiralFrog</a> &#8211; while not directly a torrent site, spiralfrog offers membership-only free and legal music downloads using a very special license-renewal concept</li>
<li><a href="http://gpirate.com">Gpirate</a> &#8211; is getting rave reviews from several About.com readers</li>
<li><a href="http://mininova.org">Mininova</a> &#8211; is the successor to Supernova, one of the original big torrent databases of the Web</li>
<li><a href="http://torrent-finder.com">Torrent-finder</a> &#8211; several readers from the central USA submitted this site recently. This site is gaining a bigger readership every day</li>
<li><a href="http://demonoid.com">Demonoid</a> &#8211; is now back online! They have established themselves outside of the USA this spring 2008, and have resumed torrent operations. Demonoid is still a private community, and members are held liable for any leeching that their invited friends do in this community. If you are lucky enough to get a Demonoid membership, invite your friends carefully, lest you lose your own membership.</li>
<li><a href="http://isohunt.com">Isohunt</a> &#8211; in a shocking turn of the tables this September, the Isohunt webmaster is counter-suing the Canadian music industry. He is claiming that previous copyright violation suits against him were unfounded, and that he is entitled to have his legal expenses recovered.</li>
<li><a href="http://thepiratebay.org">The Pirate Bay</a> &#8211; by readership size, is the most popular torrent search site today. Pirate Bay also has an immense database of 600,000+ torrents, the single largest database available on the web.</li>
<li><a href="http://bitsoup.org">Bitsoup</a> &#8211; is a growing favorite amongst P2P downloaders. As the trend towards private torrent sharing continues, you will need to signup and join as a member to participate in the Bitsoup swarm.</li>
<li><a href="http://torrentscan.com">Torrentscan</a> &#8211; is a search engine that searches other torrent search engines</li>
</ul>
<h3>Some more reading</h3>
<ul>
<li><a href="http://netforbeginners.about.com/od/peersharing/a/torrent_search.htm">View the full list of top 35 Torrent Search Engines on About.com</a></li>
<li><a href="http://en.wikipedia.org/wiki/Comparison_of_BitTorrent_clients">Complete Comparison of BitTorrent Clients</a></li>
<li><a href="http://en.wikipedia.org/wiki/Peer-to-peer">Complete Comparison of all P2P Software</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/how-to-download-with-torrents/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Developing a CMS Site. Part2: Coding Structure</title>
		<link>http://thinkclay.com/news/developing-a-cms-site-part2-coding-structure</link>
		<comments>http://thinkclay.com/news/developing-a-cms-site-part2-coding-structure#comments</comments>
		<pubDate>Thu, 06 Nov 2008 08:07:42 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[web standards]]></category>
		<guid isPermaLink="false">http://www.new-age-design.com/?p=276</guid>
		<description><![CDATA[Now we dive into what I do best.. front-end web development and User Interface! If you&#8217;re a regular visitor to my site, you&#8217;ll notice that for the past three months I&#8217;ve had a pretty dull site, and have slowly been refining it. I&#8217;m going to aim this post not so much as a &#8220;how to&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Now we dive into what I do best.. front-end web development and User Interface! If you&#8217;re a regular visitor to my site, you&#8217;ll notice that for the past three months I&#8217;ve had a pretty dull site, and have slowly been refining it. I&#8217;m going to aim this post not so much as a &#8220;how to&#8221; but more as a &#8220;how I&#8221; because it&#8217;s sometimes easier to look at the steps someone takes on a real project, than it is to be told steps to follow without having something tangeable to link to.</p>
<p>In the early design phase, I had a really vague idea of what I wanted my site to be, but I didn&#8217;t want it to be &#8220;typical&#8221; and I hadn&#8217;t really seen a site that matched what I was going for. I still started first by looking around at what I liked in other sites, and thinking of how I could incorporate that into my own. Then after the first week I happened to come across a theme that was absolutely gorgeous, by <a href="http://darrenthoyt.com" title="Darren Hoyt - Web Designer">Darren Hoyt</a> and <a href="http://thenestedfloat.com" title="Matt Dawson - Web Developer">Matt Dawson</a> and used it as my base for development. I love the grid, the structure and the User Interface that this layout has. My approach is once you&#8217;ve established your frame,  UI, and grid; you can slowly add creative enhancements as you go (at least that&#8217;s my preferred approach, some designers and such may argue it, depends on the scope really).</p>
<p>After I applied the new theme, I began my breakdown approach by changing the color scheme, and re-adjusting some of the positions/sizes/padding/etc on the elements of the page. For example, I wanted larger font sizes, better font spacing, a different color scheme, etc. Once i had the theme, I started making the modifications to the style sheets. Most themes will use just one or two stylesheets, editable within WordPress itself under the <em>Design</em> tab, or within the <em>wp-content/themes/yourtheme</em> if accessing the site via FTP. Style are typically labeled <em>style.css</em> or separated into different layout styles like <em>nav.css</em>, <em>type.css</em>, <em>posts.css</em> and so forth.</p>
<h3>HTML and CSS</h3>
<p>For those of you that are just starting out, I want to go over some basics so that I don&#8217;t lose you further down the road. I&#8217;m sure if you&#8217;ve been reading anywhere on how to <a href="http://www.buildyoursite.com">make a website</a> you&#8217;ve seen the acronyms HTML and CSS. These are two extremely important pieces to front-end development. They define structure and how to present structure.</p>
<p>HTML stands for HyperText Markup Language, which basically means it&#8217;s transferable content. HTML serves as the structure of a website. If HTML were part of a building a house, it would be the lumber, doors, windows, <a href="http://www.creativecorners.net">drywall</a>, etc.</p>
<p>CSS stands for Cascading Style Sheets, which means transferable/reusable styles. CSS serves as the display of a website. If it were part of building a house, it would be the overall blueprint and floor plan, as well as the paint, trim and furniture.</p>
<p>Hopefully my analogies make sense.. moving forward.</p>
<h3>Using CSS to layout your site</h3>
<p>So if you downloaded a theme and opened the main CSS files, you&#8217;ll see that some of it just clicks. Things like &#8220;background-color&#8221; are literal to what they&#8217;re styling. The hardest part to CSS isn&#8217;t colors and fonts, but more in layout like sizes, margins, and paddings. I&#8217;m not going to define all the style definitions, but like I said before, CSS is both the blueprint and the paint, so some styles relate to structure and some relate to skin.</p>
<p>The best way to learn CSS is to mess around. The basics that you need to know are elements, classes and ID&#8217;s. Elements are HTML defined content, such as &lt;p&gt; paragraph tags, &lt;div&gt; structure tags, &lt;ul&gt; lists, &lt;h1&gt; headers, etc. Classes can be attached to these tags like &lt;p class=&#8221;redtext&#8221;&gt; in HTML and to style that in the CSS you would define the paragraph tag with the class <em>redtext</em> be writing <em>p.redtext { color: red; }</em> in the style sheet. The <em>period</em> represents the <em>class</em> and the <em>p</em> represents what <em>element</em> that style is attached to. To style all paragraph tags we could simple drop the class and write <em>p { color: red; }</em> because then we&#8217;re simply targeting the paragraph element. This principles works the same with <em>id&#8217;s</em> which are represented with a <em>#</em> symbol. The difference between an id and class is that a class can be used multiple times in a single page and an ID can only be used once.</p>
<h3>Homework</h3>
<p>For this next week, try to learn some CSS basics. If you&#8217;re a beginner, work from a theme that someone already did the hard part of laying out, and just change colors or adjust sizes slightly and tweak it until your happy. Try and get the site styled with the colors you like and sizes you like. If it looks boxy and boring, that&#8217;s GOOD. We don&#8217;t want to focus on the creative elements more than we focus on the layout and structure yet.. that comes with time.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/news/developing-a-cms-site-part2-coding-structure/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Developing a CMS Site. Part1: Design</title>
		<link>http://thinkclay.com/news/developing-a-cms-site-part1-design</link>
		<comments>http://thinkclay.com/news/developing-a-cms-site-part1-design#comments</comments>
		<pubDate>Thu, 30 Oct 2008 04:33:51 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[web standards]]></category>
		<guid isPermaLink="false">http://www.new-age-design.com/?p=144</guid>
		<description><![CDATA[I&#8217;ve decided to teach some of my coworkers and friends how to develop a dynamic website based on clean and valid XHTML/CSS and the WordPress CMS. This tutorial is aimed specifically for their benefit, but I figured i may as well offer it to the public, because I&#8217;m sure someone else out there will take [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to teach some of my coworkers and friends <strong>how to develop a dynamic website</strong> based on clean and <strong>valid XHTML/CSS</strong> and the <strong>WordPress</strong> CMS. This tutorial is aimed specifically for their benefit, but I figured i may as well offer it to the public, because I&#8217;m sure someone else out there will take interest.</p>
<p>***Please direct all comments and questions through this blog post rather than emailing me, that way others can review and build off communication back and forth***</p>
<h3>Prerequisites</h3>
<p>There are two main phases to web development and they are the most crucial. An application or website needs to have a good <strong>User Inteface (UI)</strong> and remain <strong>highly reliable/functional</strong>. These two phases are usually labeled as <strong>Front-end development</strong> (which covers everything from Graphic Design to coding in XHTML, CSS, Flash, and JS) and <strong>Back-end development</strong> ( which involves a server side programming language such as PHP, ASP, or Ruby and a database such as MySQL, MS SQL, etc). I&#8217;m going to use this terminology often throughout this tutorial, so it&#8217;s best that you research these terms now if you don&#8217;t know what those technologies are.</p>
<h3>Part 1: Design</h3>
<p>Lets get started. First I want you to draw a design. You can do this however you want, a lot of people jump right into Photoshop and start designing. I personally like to bust out a pen and paper and sketch first. I like to get a feel for layout, grid, and flow before I get too heavy into a designed mockup. This method may prove useful for those of you who don&#8217;t know photoshop, as it will help you understand and learn the process of creative and UI thinking and give you a blueprint to reference if you design without a PSD to breakdown.</p>
<p>Spend some time on this phase. Like I said its the most important phase. Often times, in the professional world, a designer will create 3 completely different mockups or wireframes presenting the same content. This allows and forces the designer as well as the client to see and think with three completely different concepts and ideas for presentation. I recommend that you do such as well. After you develop 3 completely different ideas, sit down with someone else and circle things that you like and dislike about each and try to chose the one that best presents the concept. If you can or want, merge ideas from the other concept designs with the base that you choose. Then refine it like crazy. Many iterations are often necessary to reach a design that you&#8217;re completely satisfied with.</p>
<p><em>The next tutorial will follow in 1 week. This will force those who are following my posts in real time, to spend the amount of time necessary to refine. Feel free to leave comments, ask questions, or make suggestions in the mean time.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/news/developing-a-cms-site-part1-design/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Steps to Set and Achieve Goals</title>
		<link>http://thinkclay.com/news/steps-to-set-and-achieve-goals</link>
		<comments>http://thinkclay.com/news/steps-to-set-and-achieve-goals#comments</comments>
		<pubDate>Mon, 15 Sep 2008 20:40:53 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[personal]]></category>
		<guid isPermaLink="false">http://www.new-age-design.com/?p=88</guid>
		<description><![CDATA[Every so often I like to remind myself what the goals are of my life and what my intentions and motivation for doing things are. I&#8217;ve spread myself across many trades related to Internet Marketing and Web Development lately and I need a sticky note to reference once in a while, to remember what it [...]]]></description>
			<content:encoded><![CDATA[<p>Every so often I like to remind myself what the goals are of my life and what my intentions and motivation for doing things are. I&#8217;ve spread myself across many trades related to <strong>Internet Marketing</strong> and <strong>Web Development</strong> lately and I need a sticky note to reference once in a while, to remember what it is I&#8217;m actually trying to achieve and how I&#8217;m going to achieve it. So as I define for myself again my <strong>Steps to Set and Achieve Goals</strong>, I hope that you can benefit and learn something as well.</p>
<h3>Setting Goals</h3>
<p>I think it&#8217;s really important to have well define goals.. always. It&#8217;s funny, I remember back to Grade School being taught that individuals that set goals and write them on paper or communicate them, are highly likely to achieve them over someone with the same unspoken goals. Goal setting is not a hard thing to do, and they don&#8217;t take long. So why don&#8217;t more people set goals? I think because there is so much mystery in life. Some think that goal setting will lead them to a anal-retentive life style and stop them from being spontaneous and crazy. But this is simply not true, I&#8217;m one of the craziest and most spontaneous goal-setters you&#8217;ll ever meet. Along with that, I think that people avoid self-discovery. Often times we let the world define us and we don&#8217;t want to look in our own hearts and decide for ourselves what we want or should have in life. Shame on society.</p>
<p>So set goals. It&#8217;s simple. Do it right now, before you even read any farther. Write down one thing that you really want or at least say it out loud, and then continue on to find out how to reach that goal.</p>
<h3>Following a Course of Action</h3>
<p>This is one of my favorite terms to use. &#8220;Course of Action&#8221; simply means, &#8220;What do I do next.&#8221; Many times the course of action is rather small and highly attainable. Say you want to become President of the United States. Most would agree that&#8217;s a really high goal to try and achieve. Rather than just talking about becoming president or dreaming big dreams, you have to look at what you can do initially to get you there. So to specify the setting further, pretend you&#8217;re a college student currently and Presidency is your ultimate goal. A good <strong>course of action</strong> would be to find either a politacal college group on campus, or find an alliance or association of other students looking to reach similar goals. This is something you can do immediately with little to no cost, which also helps you to network and meet people that can help you reach the next level.</p>
<p>Course of action can also be define as <strong>doing</strong>. Meaning.. what can you do right now to reach your goal. If you can&#8217;t do it this instant when is the soonest you can do it and what will get you there faster. Though if you have to plan that much out for a dream, then it may be best to setup a hierarchy of actions. I&#8217;ll get to that in a minute though.</p>
<h3>Tracking Deliverables</h3>
<p>The next step after your course of action is defining your <a title="What is a deliverable?" href="http://en.wikipedia.org/wiki/Deliverable" target="_blank">deliverables</a> which are simply tangible objects &#8212; what can you physically touch, see, give, receive, and so on.. to track your progress towards your goal. Once again, using the scenario I created of a college student trying to become President, the first deliverable might be an official membership in a group, maybe a few <a href="http://www.allbusinesscards.com">business cards </a>of potential partners, or maybe a few contacts and friendships formed of people with the same dreams. I&#8217;ve theorized for some time now that your work ethic and sense of business is most heavily influenced by your <strong>five closest friends</strong>. If this is true, a friendship with someone that has the same goals in life as you can potentially be one of the most important relationships you make and is a very valuable deliverable indeed.</p>
<h3>Rinse and Repeat</h3>
<p>I could talk for quite some time about <strong>business strategy</strong> and <em>how a cash-flow diagram</em>, <em>solid business model</em>, or a <em>client network</em> are crucial for doing business, but that would break away from the goal of this post. The deliverable I&#8217;m trying to give you is plain and simply a easy way to set and follow goals.</p>
<p>With that said, <strong>setting goals</strong> &gt; <strong>following a course of action</strong> &gt; <strong>delivering a result</strong> are all you need to get started. These components can be used and stacked together.. a team of goals working towards one vision. Some goals require micro goals and some micro goals have to lead to some macro goal. It&#8217;s all about building blocks and following steps. Crazy similes.</p>
<p>&#8211;</p>
<p>Along this same concept, my good friend, <a title="Ravi Vora's Personal Site" href="http://ravivora.com" target="_blank">Ravi Vora</a> has a good post on <a title="Ravi Vora's Personal Site - Follow your dreams" href="http://ravivora.com/blog/stop-being-a-pansy-and-start-living-your-dream" target="_blank">following your dreams</a> that you should definitely check out.</p>
<div id="seolinx-tooltip" style="border: 1px solid #000000; margin: 0pt; padding: 0pt; display: none; opacity: 0.9; position: absolute; width: auto; z-index: 99999;">
<table style="border: 0pt none; margin: 0pt; padding: 0pt; border-collapse: separate; width: auto;" border="0">
<tbody>
<tr>
<td id="seolinx-table" style="border: 0pt none; margin: 1px; padding: 0pt; font-family: Tahoma; font-size: 11px; font-weight: bold;">
<div style="margin: 0pt; padding: 0pt; overflow: auto; width: auto;">
<table id="seolinx-paramtable" style="border: 1px solid gray; margin: 0pt; border-collapse: separate;" border="0">
<tbody>
<tr>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://toolbarqueries.google.com/favicon.ico" alt="" width="12" height="12" /> PR: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Google pagerank" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://www.google.com/favicon.ico" alt="" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Google index" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://www.google.com/favicon.ico" alt="" width="12" height="12" /> L: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Google links" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://siteexplorer.search.yahoo.com/favicon.ico" alt="" width="12" height="12" /> LD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Yahoo linkdomain" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://search.msn.com/favicon.ico" alt="" width="12" height="12" /> I: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="MSN index" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Sitemap.xml" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://siteanalytics.compete.com/favicon.ico" alt="" width="12" height="12" /> C: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Compete Rank" href="javascript:{}">wait&#8230;</a></td>
<td style="border: 1px solid gray; padding: 2px; background: #f0f0f0 none repeat scroll 0% 0%; color: darkgreen; font-family: Tahoma; font-size: 7pt; font-weight: bold; white-space: nowrap;"><img style="vertical-align: middle;" src="http://seodigger.com/favicon.ico" alt="" width="12" height="12" /> SD: <a style="color: blue; font-family: Tahoma; font-size: 7pt; font-weight: bold; text-decoration: underline;" title="Seodigger" href="javascript:{}">wait&#8230;</a></td>
</tr>
</tbody>
</table>
</div>
</td>
<td id="seolinx-tooltip-close" style="border: 0pt none; margin: 0pt; padding: 1px; cursor: pointer; vertical-align: middle; width: auto;" title="close"><img src="chrome://seoquake/content/skin/close.gif" alt="" /></td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/news/steps-to-set-and-achieve-goals/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
