<?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>The Mountain Of Lightbulbs</title>
	<atom:link href="http://www.razpeel.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.razpeel.com/blog</link>
	<description>WebDevelopment - News &#124;&#124; Work &#124;&#124; Tutorials</description>
	<lastBuildDate>Fri, 12 Feb 2010 16:17:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Immersive Video From Haiti</title>
		<link>http://www.razpeel.com/blog/news/immersive-video-from-haiti/</link>
		<comments>http://www.razpeel.com/blog/news/immersive-video-from-haiti/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 17:51:38 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=431</guid>
		<description><![CDATA[I don&#8217;t often use my blog to share content, I find mediums such as Twitter or Facebook serve that purpose better, but I saw this today and it struck me as particularly awesome so I wanted to help generate some exposure.
Immersive Media, a North American based digital agency, have created a video stream, which can [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t often use my blog to share content, I find mediums such as Twitter or Facebook serve that purpose better, but I saw this today and it struck me as particularly awesome so I wanted to help generate some exposure.<br />
Immersive Media, a North American based digital agency, have created a video stream, which can be manipulated on the fly. As you travel through Haiti, you can turn the camera to look in any direction you please.</p>
<p>While this has been possible for a while, you don&#8217;t see it often, and I would love to see it more.</p>
<p><object type="application/x-shockwave-flash" data="http://www.immersivemedia.com/haiti/Video8/IMPlayer.swf?config=http://www.immersivemedia.com/haiti/Video8/config.xml" width="520" height="345"><param name="movie" value="http://www.immersivemedia.com/haiti/Video8/IMPlayer.swf?config=http://www.immersivemedia.com/haiti/Video8/config.xml" /></object></p>
<p>More videos from Haiti at <br /><a href="http://www.immersivemedia.com/haiti/index.php">http://www.immersivemedia.com/haiti/</a><br />
<br />
You can donate to the Haiti relief effort at <br /><a href="http://donate-haiti.org/">http://donate-haiti.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/news/immersive-video-from-haiti/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Tracer For Firefox 3.5</title>
		<link>http://www.razpeel.com/blog/tutorials/flash-tracer-for-firefox-3-5/</link>
		<comments>http://www.razpeel.com/blog/tutorials/flash-tracer-for-firefox-3-5/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 03:22:01 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[FireFox 3]]></category>
		<category><![CDATA[FireFox 3.5]]></category>
		<category><![CDATA[Flash Add-ons]]></category>
		<category><![CDATA[Flash Log]]></category>
		<category><![CDATA[Flash Tracer]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=400</guid>
		<description><![CDATA[I just installed Flash Tracer on the newest version of Firefox (currently 3.5.3), and I wanted to shed some light on the steps you will need to take to get it working.
The first think you will notice is that Alessandro Crugnola, the talented creator of this add-on, no longer continues it&#8217;s development, so if you [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed Flash Tracer on the newest version of Firefox (currently 3.5.3), and I wanted to shed some light on the steps you will need to take to get it working.</p>
<p>The first think you will notice is that Alessandro Crugnola, the talented creator of this add-on, no longer continues it&#8217;s development, so if you visit it&#8217;s page on the Mozilla Add-ons website (<a href="https://addons.mozilla.org/en-US/firefox/addon/3469">https://addons.mozilla.org/en-US/firefox/addon/3469</a>), it does not give you the option to install it, instead telling you: <em>&#8220;This add-on is for older versions of Firefox&#8221;</em>. You can still install it by loading the add-ons .xpi file though, which is located on its home page <a href="http://www.sephiroth.it/firefox/flashtracer/">http://www.sephiroth.it/firefox/flashtracer/</a> (The link is <a href="http://www.sephiroth.it/examples/firefox/extensions/flashtracer.xpi">here</a> if your feeling lazy).</p>
<p>Next you will need to tell Firefox that you are comfortable using out of date add-ons. Open a new browser window or tab, and type <em>about:config</em> into the address bar as shown below.</p>
<p><img class="size-full wp-image-402" title="ConfigAddressBar" src="http://www.razpeel.com/blog/wp-content/uploads/2009/10/ConfigAddressBar.jpg" alt="Navigation Bar Preview" width="140" height="30" /></p>
<p>After promising Mozilla that you will be careful, you will see a list of the Firefox configuration details. Right click anywhere on this page and create a new <strong>Boolean</strong>.</p>
<p><img class="size-full wp-image-404" title="CreateNewBoolean" src="http://www.razpeel.com/blog/wp-content/uploads/2009/10/CreateNewBoolean.jpg" alt="Inserting New Boolean Example" width="500" height="364" /></p>
<p>Give your new Boolean the following name: <strong>extensions.checkCompatability</strong>.</p>
<p><img class="size-full wp-image-405" title="EnterBooleanName" src="http://www.razpeel.com/blog/wp-content/uploads/2009/10/EnterBooleanName.jpg" alt="Enter Boolean Name Preview" width="321" height="172" /></p>
<p>And finally, set it&#8217;s value to <strong>false</strong>.</p>
<p><img class="size-full wp-image-406" title="SetBooleanValue" src="http://www.razpeel.com/blog/wp-content/uploads/2009/10/SetBooleanValue.jpg" alt="Set Boolean Value Example" width="304" height="164" /></p>
<p>Restart Firefox and your add-on should now load correctly.<br />
Click &gt; <em>Tools</em> &gt; <em>Flash Tracer</em> to open the Flash Log and you should see something like this:</p>
<p><img class="size-full wp-image-407" title="FlashTracerRunning" src="http://www.razpeel.com/blog/wp-content/uploads/2009/10/FlashTracerRunning.jpg" alt="Flash Tracer Running In Firefox 3.5" width="301" height="423" /></p>
<p>If you don&#8217;t see the text inside it, you might have to configure Flash Tracer to read the correct file. You can do this by opening the preferences panel, (click the small wrench icon in the bottom right hand corner of the window) and browsing to the correct location. If you have Flash Player 9 forwards, It&#8217;s probably in one of these locations:</p>
<ul>
<li><strong>Osx:</strong> <em><strong>{user}</strong>\Library\Preferences\Macromedia\Flash Player\Logs\flashlog.txt</em></li>
<li><strong>Windows XP:</strong> <em>C:\Documents and Settings\<strong>{user}</strong>\Application Data\Macromedia\Flash Player\Logs\flashlog.txt</em>.</li>
<li><strong>Windows Vista:</strong> <em>C:\Users\<strong>{user}</strong>\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txt</em></li>
</ul>
<p>If you can&#8217;t find the file at the any of the above locations, or it&#8217;s not picking up trace statements when you know it should be, I&#8217;d suggest reading through this fantastic post by <a href="http://yourpalmark.com/2005/07/01/trace-from-the-browser-using-standard-trace/">Mark Walters on correctly setting up Flash Player&#8217;s error reporting.</a></p>
<p><span style="text-decoration: underline;">Random Short Story</span><br />
A year or so back I was playing a Flash game on NewGrounds and hadn&#8217;t shut down the Mac Console (which was still reading through the error log), and I noticed the following message: &#8220;need to implement score saving still, sorry!!&#8221;.<br />
It&#8217;s since been fixed, but I thought it was hilarious at the time, and as such I&#8217;ve tried to make a point of leaving funny messages hidden inside anything I&#8217;m not being paid to create. I thoroughly encourage you to do the same!</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; Hope This Helps! :] &quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/tutorials/flash-tracer-for-firefox-3-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Directory Lists (With Php)</title>
		<link>http://www.razpeel.com/blog/tutorials/xml-directory-lists-with-php/</link>
		<comments>http://www.razpeel.com/blog/tutorials/xml-directory-lists-with-php/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 11:15:21 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Flash Directory Lists]]></category>
		<category><![CDATA[Flash XML Directory List]]></category>
		<category><![CDATA[Flash XML Directory Lists]]></category>
		<category><![CDATA[PHP Directory List]]></category>
		<category><![CDATA[PHP Directory Lists]]></category>
		<category><![CDATA[XML Directory List]]></category>
		<category><![CDATA[XML Directory Lists]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=377</guid>
		<description><![CDATA[Here is a snippet of php code that when run, will produce an XML markup of the images contained within a directory.
This is great is you are building a flash sideshow or similar and want to remove the dependency that comes with hand coding XML files.
I added a bunch of comments, feel free to let [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a snippet of php code that when run, will produce an XML markup of the images contained within a directory.<br />
This is great is you are building a flash sideshow or similar and want to remove the dependency that comes with hand coding XML files.</p>
<p>I added a bunch of comments, feel free to let me know if anything needs explaining in greater detail.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> DirDisplay<span style="color: #009900;">&#40;</span><span style="color: #000088;">$LocDir</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// list of valid image extensions to look for</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$valid_ext</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;jpg&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$valid_ext</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;png&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$valid_ext</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;gif&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$valid_ext</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;bmp&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// init XML output</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;Images&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// open directory</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$TrackDir</span><span style="color: #339933;">=</span><span style="color: #990000;">opendir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$LocDir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// loop through files</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">readdir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$TrackDir</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// check for non-parent file names</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;.&quot;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;..&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// reads file extension</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strrchr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// makes sure file has allowed extension</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ext</span><span style="color: #339933;">,</span><span style="color: #000088;">$valid_ext</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// adds file to XML output</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;Image&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'&lt;![CDATA['</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #339933;">.</span><span style="color: #0000ff;">']]&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'&lt;/Image&gt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// end XML output</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;/Images&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// close open directory</span><br />
&nbsp; &nbsp; <span style="color: #990000;">closedir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$TrackDir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #339933;">@</span> DirDisplay<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>And here is an example output. I&#8217;ll post up a demo using this xml markup in a future post.</p>
<div class="codecolorer-container xml mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Images<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Image_01.jpg]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Image_02.jpg]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Image_03.jpg]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Image_04.jpg]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Images<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></td></tr></tbody></table></div>
<p><a href="http://www.razpeel.com/blog/wp-content/uploads/2009/10/XmlImageList.rar">Here&#8217;s a link to download the file</a>, hope it helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/tutorials/xml-directory-lists-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash &amp; Flex IRC Channels on Freenode.</title>
		<link>http://www.razpeel.com/blog/news/flash-flex-irc-chat-channels-on-freenode/</link>
		<comments>http://www.razpeel.com/blog/news/flash-flex-irc-chat-channels-on-freenode/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 17:40:46 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[ActionScript IRC]]></category>
		<category><![CDATA[Channel]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Chat Channel]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash IRC]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex IRC]]></category>
		<category><![CDATA[Freenode]]></category>
		<category><![CDATA[Irc]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=323</guid>
		<description><![CDATA[I&#8217;ve spend a good amount of time trying to give back to the community of late and wanted to share #Flash and #Flex, IRC chat channels on the Freenode network. They have been an invaluable resource to me in my time using the Flash Platform, I&#8217;ve really not seen a more helpful bunch! Once in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spend a good amount of time trying to give back to the community of late and wanted to share <strong>#Flash</strong> and <strong>#Flex</strong>, IRC chat channels on the <a href="http://freenode.net/" target="_blank">Freenode </a>network. They have been an invaluable resource to me in my time using the Flash Platform, I&#8217;ve really not seen a more helpful bunch! Once in a while I see a few big names like <a href="http://blog.digitalbackcountry.com/" target="_blank">Ryan Stewart</a> from Adobe offering to pass on feedback from developers to the people that need to hear it, which is awesome!</p>
<p>Hope to see some new folks on the network, my handle is RazPeel for anyone wanting to look me up.</p>
<p>Use of these channels will be obvious to most, but for those not familiar with IRC, here is the ten second rundown.</p>
<ol>
<li>You will need an IRC client. There&#8217;s millions, a popular one is <a href="http://www.mirc.com/" target="_blank">mIRC</a>. You can download it at <a href="http://www.mirc.com/get.html" target="_blank">this link</a>.</li>
<li>When you have it installed and running, use the command:<br />
<em>/server irc.freenode.net</em></li>
<li>Once connected, two more commands:<br />
<em>/join #flash</em> and finally <em>/join #flex</em></li>
</ol>
<p>Alternatively you can always use a web based chat client if you like, such as the one at <a href="http://searchirc.com/javachat.php?c=Zmxhc2g&amp;s=aXJjLmZyZWVub2RlLm5ldA&amp;p=NjY2Nw&amp;n=NTk" target="_blank">this link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/news/flash-flex-irc-chat-channels-on-freenode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Flash Countdowns And Timers</title>
		<link>http://www.razpeel.com/blog/tutorials/simple-flash-countdowns-and-timers/</link>
		<comments>http://www.razpeel.com/blog/tutorials/simple-flash-countdowns-and-timers/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 07:32:18 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=303</guid>
		<description><![CDATA[
I get asked for help doing different variations of Countdowns and Timers all the time, hopefully this post will shed some light on things. 
I&#8217;ll try cover and explain the four variations I get asked about the most but between them you should be able to create any of the other variations with ease.


1) Simple [...]]]></description>
			<content:encoded><![CDATA[<p>
I get asked for help doing different variations of Countdowns and Timers all the time, hopefully this post will shed some light on things. </p>
<p>I&#8217;ll try cover and explain the four variations I get asked about the most but between them you should be able to create any of the other variations with ease.
</p>
<p></p>
<p><strong>1) Simple Countdown In Seconds </strong></p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> countDownTime<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> startTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">1000</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> updateTimer<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> updateTimer <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">secondsUTC</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">1000</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> timeRemaining<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>startTimeUTC <span style="color: #000066; font-weight: bold;">+</span> countDownTime<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">-</span> <span style="color: #004993;">secondsUTC</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<p>
  Pretty simple code, all we are doing is setting a start time and comparing the current time to it when the update function runs.<br />
  Note: The above snippet doesn&#8217;t actually do anything with the counter or perform any task when the counter reaches zero. I&#8217;m rather just showing how to calculate time, implementation of the code is up to you!
</p>
<p>Here is a sample output:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_CountDown_1681810135"
			class="flashmovie"
			width="480"
			height="60">
	<param name="movie" value="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountDown.swf" />
	<param name="scale" value="noscale" />
	<param name="bgcolor" value="#F3FBFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountDown.swf"
			name="fm_CountDown_1681810135"
			width="480"
			height="60">
		<param name="scale" value="noscale" />
		<param name="bgcolor" value="#F3FBFF" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>
Lets take a closer look at the code now.<br />
<br />
Line 2 defines <em>startTimeUTC</em>, which is populated by creating a new <em>Date()</em> object. <br />
Note: The <em>Date</em>() object defaults to the current date and time when instantiated without any parameters, so we can immediately call it&#8217;s <em>getTime()</em> method and store the result.<br />
We should now have a funny looking number like: 1248677922937, which is actually a <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time" target="_blank">UTC</a> representation of the present time in milliseconds. On this occasion however, we just need the seconds, so we would divide that number by 1000, (1 second is 1000 milliseconds).<br />
Now every time the update function runs, we simply replicate this action to create a new <em>Date(), </em>and compare it  to the <em>Date()</em> we stored in <em>startTimeUTC</em>.</p>
<p></p>
<p><strong>2) Simple Count Up In Seconds</strong></p>
<p>
Measuring time expired is really just the above backwards.</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> startTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> traceOutput<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> traceOutput <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> newTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> timeExpired<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span>newTimeUTC <span style="color: #000066; font-weight: bold;">-</span> startTimeUTC<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">/</span> 1000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<p>Example:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_CountUp_244361174"
			class="flashmovie"
			width="480"
			height="60">
	<param name="movie" value="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountUp.swf" />
	<param name="scale" value="noscale" />
	<param name="bgcolor" value="#F3FBFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountUp.swf"
			name="fm_CountUp_244361174"
			width="480"
			height="60">
		<param name="scale" value="noscale" />
		<param name="bgcolor" value="#F3FBFF" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p></p>
<p> <strong>3) Countdown To Date</strong></p>
<p>This variation builds on the first and second countdown examples but brings more to the sandbox to play with, lets jump straight into the code.</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> futureTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span>2010<span style="color: #000066; font-weight: bold;">,</span> 0<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> updateCounter<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> updateCounter <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> newTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> timeRemainingUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <br />
&nbsp; &nbsp; &nbsp; &nbsp; futureTimeUTC <span style="color: #000066; font-weight: bold;">-</span> newTimeUTC<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockSecondsPast<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeRemainingUTC <span style="color: #000066; font-weight: bold;">/</span> 1000<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">%</span> 60<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockMinutesPast<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeRemainingUTC <span style="color: #000066; font-weight: bold;">/</span> 60000<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">%</span> 60<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockHoursPast<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeRemainingUTC <span style="color: #000066; font-weight: bold;">/</span> 3600000<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">%</span> 24<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockDaysPast<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeRemainingUTC <span style="color: #000066; font-weight: bold;">/</span> 86400000<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<p> This time we have manually set the <em>Date()</em> to January 1st, 2010 (The first month is 0, not 1). The time will default to 00:00am since it was not set, but this is what we want, new years!!<br/><br />
Once we have calculated <em>timeRemaining</em> in the update function, we can parse the information we need from it. Remember it is currently a UTC format number, so think of it as the number of milliseconds, with that in mind it isn&#8217;t hard to find what we need. <br />
Note: The % operator is modulus, it returns the remainder of a number.</p>
<ul>
<li>Seconds = (UTC Value / 1000 Milliseconds) Mod 60</li>
<li>Minutes = (UTC Value / (1000 * 60 Seconds)) Mod 60</li>
<li>Hours = (UTC Value / (1000 * 60 * 60 Minutes)) Mod 24</li>
<li>Days = (UTC Value / (1000 * 60 * 60 * 24 Hours))</li>
</ul>
<p> If you didn&#8217;t catch it, we are just dividing by the amount of Milliseconds in each. Here is an example: </p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_CountDownDate_28318786"
			class="flashmovie"
			width="480"
			height="60">
	<param name="movie" value="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountDownDate.swf" />
	<param name="scale" value="noscale" />
	<param name="bgcolor" value="#F3FBFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountDownDate.swf"
			name="fm_CountDownDate_28318786"
			width="480"
			height="60">
		<param name="scale" value="noscale" />
		<param name="bgcolor" value="#F3FBFF" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p></p>
<p><strong>4) Counter From Past Date</strong></p>
<p>The last variation is really just the previous example backwards, for when you need to count forward from a date in the past.</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> startTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span>2009<span style="color: #000066; font-weight: bold;">,</span> 06<span style="color: #000066; font-weight: bold;">,</span> 26<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> updateCounter<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> updateCounter <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> newTimeUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Date</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> timeExpiredUTC<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; newTimeUTC <span style="color: #000066; font-weight: bold;">-</span> startTimeUTC<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockSecondsExpired<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeExpiredUTC <span style="color: #000066; font-weight: bold;">/</span> 1000<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">%</span> 60<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockMinutesExpired<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeExpiredUTC <span style="color: #000066; font-weight: bold;">/</span> 60000<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">%</span> 60<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockHoursExpired<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeExpiredUTC <span style="color: #000066; font-weight: bold;">/</span> 3600000<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">%</span> 24<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> clockDaysExpired<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> =<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>timeExpiredUTC <span style="color: #000066; font-weight: bold;">/</span> 86400000<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<p> And an example to match: </p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_CountUpDate_2140653544"
			class="flashmovie"
			width="480"
			height="60">
	<param name="movie" value="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountUpDate.swf" />
	<param name="scale" value="noscale" />
	<param name="bgcolor" value="#F3FBFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.razpeel.com/blog/wp-content/uploads/2009/07/CountUpDate.swf"
			name="fm_CountUpDate_2140653544"
			width="480"
			height="60">
		<param name="scale" value="noscale" />
		<param name="bgcolor" value="#F3FBFF" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/tutorials/simple-flash-countdowns-and-timers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toronto Dead Drop Explained</title>
		<link>http://www.razpeel.com/blog/news/toronto-dead-drop/</link>
		<comments>http://www.razpeel.com/blog/news/toronto-dead-drop/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:06:15 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[CS4 Dead Drop]]></category>
		<category><![CDATA[CS4 Master Collection]]></category>
		<category><![CDATA[Dead Drop]]></category>
		<category><![CDATA[FITC Contest]]></category>
		<category><![CDATA[FITC Drop]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Hilton Toronto]]></category>
		<category><![CDATA[Lee Brimelow Contest]]></category>
		<category><![CDATA[Lee Brimelow Dead Drop]]></category>
		<category><![CDATA[Raz Peel]]></category>
		<category><![CDATA[Toronto]]></category>
		<category><![CDATA[Toronto Dead Drop]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=180</guid>
		<description><![CDATA[I thought I&#8217;d give my own story of the Toronto Dead Drop as It was really interesting to read Karl Freeman&#8217;s take on the London drop after he had successfully retrieved it.
I&#8217;d always read about other dead drops and been waiting to see Lee come to Toronto for a while, unfortunately I happened to be [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d give my own story of the <a href="http://theflashblog.com/?p=944">Toronto Dead Drop</a> as It was really interesting to read <a href="http://www.karlfreeman.co.uk/2009/lee-brimelows-london-dead-drop-explained/">Karl Freeman&#8217;s take on the London drop</a> after he had successfully retrieved it.</p>
<p>I&#8217;d always read about other dead drops and been waiting to see Lee come to Toronto for a while, unfortunately I happened to be at the FITC job fair earlier on that day and ran into some friends I hadn&#8217;t seen in a while. Long story short I got home at 4am and saw Lee&#8217;s post saying it had been planted.</p>
<p><strong>Clue 1</strong><br />
I immediately looked through the page source to check for hidden links, I found none so proceeded to tell my room mate Adam, who is a huge gamer and generally good at puzzle solving about the dead drop. Embarrassingly, this part took us the longest to find, I tried looking at the possibility there was something hidden within the reCAPTCHA validation plug in to no avail, then made sure all the links on the page (including the sidebar) led to where they were suppose to. Finally i searched for embedded information within the images on the page, and then while trying to find patterns within the text itself, it hit me that it was meant literally.</p>
<p>Typing clues in the search form led to this page:</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/ste.jpg" alt="Ste Page" /></p>
<p><strong>Clue 2</strong><br />
If you noticed the title of the page are gps co-ordinates. I plugged those into google to get:</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/stmichaelav.jpg" alt="Google Gps Location" /></p>
<p>Adam and I headed to the location, which wasn&#8217;t really close to where we live, but we were so excited that it didn&#8217;t matter! We got there around 7:30am to find a sign, which i don&#8217;t have a picture for, but Lee thankfully took one, here is the image from his blog:</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/stesign.jpg" alt="Sign With Ste Number" /></p>
<p><strong>Clue 3</strong><br />
Not having mobile internet was horrible, but we had our laptops and we wrote everything on the sign down and quickly headed over to the Hilton where FITC was being hosted at, which wasn&#8217;t far at all actually.<br />
After connecting to the FITC wifi (which was horrible the whole conference btw, thanks Hilton!), plugging in the numbers at the bottom of the sign into the page led us to a new page, with a flash file that looked like this:</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/tones.jpg" alt="Tones Image" /></p>
<p>I ripped the audio from the flash file <a href="http://www.razpeel.com/blog/wp-content/uploads/2009/04/tones.mp3">(click to download)</a> which was obviously a phone dialing sequence. We tried googling DTMF translators online but didn&#8217;t find any fast enough and I grew inpatient and just loaded it up in Audacity.</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/audacity_tones.jpg" alt="Audacity Tones" /></p>
<p>By comparing the levels of sound on the spectrum view and matching a few tones up to the sound of tones on my cellphone, we quickly found a phone number &#8211; 1-866-989-3451.</p>
<p><strong>Clue 4</strong><br />
Calling the phone was a frightening ordeal in itself, it was a creepy voice telling us numbers, <a href="http://www.razpeel.com/blog/wp-content/uploads/2009/04/message.mp3">listen to the recording here.</a> Sounded like the girl from the ring!</p>
<p>We reached a consensus on what the number was after two or three dials, but it was only 10 digits and there were 11 boxes which six switches in each. I noticed how clicking next on the page passed every containers on/off state through as a variable and set to work to try find a way to make a 10 digit number containing numbers 1-9 fit in 11 spaces containing 1-6. I tried changing the base number to Octal, Hex, and a few different numbering systems to see the variations but after about 10-15m we found out it was braille. We were still missing a digit however, but after I suggested we look up the annotation for a full stop (period) in braille we found the &#8216;number following&#8217; sign which we inserted into the first box of the page along with the rest of the number.</p>
<p>Taken from wikipedia:<br />
<img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/wiki_braille.jpg" alt="Wikipedia Braille" /></p>
<p><strong>Clue 5</strong><br />
This took us to a new page with requested access to a webcamera, the webcamera had this logo besides it.</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/fitclogo.jpg" alt="Fitc Logo" /></p>
<p>It was clearly an augmented reality application, but we were still in the Hilton at the time and heading home to print this image would have taken a long time. A few minutes later we found ourselves in the business center at the hotel printing the image. We printed it out once and nothing happened, so then watched the first 20 seconds of Lee&#8217;s tutorial on augmented reality that I remember he posted a little while ago.</p>
<p>The square he had been using to trigger the reaction from the application in the tutorial had a border and was inverted from this logo, so I quickly made a border for this image, inverted it and tried printing it again. I was convinced this would work, but it didn&#8217;t. I blamed this on the shoddy quality of the printers at the Hilton, whom liked printing out grey rather than black.</p>
<p>All was not lost, decompiling this file lead me to see this line of code:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> _loc_2<span style="color: #000066; font-weight: bold;">:*</span> = <span style="color: #0033ff; font-weight: bold;">new</span> MaterialsList<span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span>all<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;mat.png&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
<p>This was loading an external texture (mat.png). So i navigated to http://leebrimelow.com/mat.png and found this image:</p>
<p><img src="http://www.razpeel.com/blog/wp-content/uploads/2009/04/finalgps.png" alt="Final Gps" /></p>
<p><strong>Clue 6</strong><br />
We set of to find the package and arrived on scene around 9:20am, we looked around the bushes where it was suppose to be for a good half hour i think, because I remember Karl saying he looked for a good period of time before he found it in the bushes for the London drop.</p>
<p>We felt defeated when we couldn&#8217;t find anything but called it quits and headed to get some lunch. We knew it was a long shot when we started out at 4am and as we had expected, later on in the day we found out that just 2 hours earlier than us somebody had already claimed it! Great job to who ever found it.</p>
<p>Next time hopefully I&#8217;ll have a portable device with internet connectivity. That would be majorly helpful these days in general. I hate not having twitter or email while I&#8217;m on the move, I also like having a roof over my head though so I think I have to put money towards rent first and foremost!</p>
<p>Thanks for doing these Lee, It was a lot of fun! See you at your Byte Array presentation in a few hours!</p>
<p>-Raz</p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/news/toronto-dead-drop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://www.razpeel.com/blog/wp-content/uploads/2009/04/tones.mp3" length="8119" type="audio/mpeg" />
<enclosure url="http://www.razpeel.com/blog/wp-content/uploads/2009/04/message.mp3" length="1586082" type="audio/mpeg" />
		</item>
		<item>
		<title>Dear Teachers</title>
		<link>http://www.razpeel.com/blog/news/dear-teachers/</link>
		<comments>http://www.razpeel.com/blog/news/dear-teachers/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 13:32:08 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Advice]]></category>
		<category><![CDATA[College]]></category>
		<category><![CDATA[Digital Media]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Seneca]]></category>
		<category><![CDATA[Seneca College]]></category>
		<category><![CDATA[Students]]></category>
		<category><![CDATA[Studies]]></category>
		<category><![CDATA[Teachers]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=161</guid>
		<description><![CDATA[I just read a wonderful post by Stacey (@bitchwhocodes)
Link: http://bit.ly/9248m
Great read Stacey, I almost fully agree. I was at Seneca College studying Digital Media just last summer, and when i look back It&#8217;s easy to see that the majority of what I learned within the realm of Media was self taught.
Students can hope for somebody [...]]]></description>
			<content:encoded><![CDATA[<p>I just read a wonderful post by Stacey (<a href="http://twitter.com/bitchwhocodes/" target="_blank">@bitchwhocodes</a>)<br />
Link: <a href="http://bit.ly/9248m" target="_blank">http://bit.ly/9248m</a></p>
<p>Great read Stacey, I almost fully agree. I was at Seneca College studying Digital Media just last summer, and when i look back It&#8217;s easy to see that the majority of what I learned within the realm of Media was self taught.</p>
<p>Students can hope for somebody like yourself to be able to direct them on the right path or shed some light when Google hasn&#8217;t given them a straight answer. This sadly isn&#8217;t the case for all College&#8217;s and wasn&#8217;t the case for me, as so, here is an open letter to my teachers from last year, and to all teachers.</p>
<p><strong>Dear Teachers,</strong></p>
<p>I think the saying &#8220;Those who can’t do, teach.&#8221; is valid to a good number of you, even If you refuse to believe this is the case. As crazy as it may sound, It seems like it has somehow become a standard that you will probably have an instructor (or a handful of instructors) each semester, teaching you material that they themselves do not know.</p>
<p>Most teachers would have considered me a horrible student. I barely attended class, I didn&#8217;t always complete my assignments, and when i was there I was reading blogs about &#8216;Absolute Nothing&#8217; or &#8216;Real Random Numbers&#8217; rather than paying attention. I admit it, I didn&#8217;t care a whole lot for some classes, and I know that showed because I never tried to hide it, for that I apologize. Part truth is that certain things just weren&#8217;t interesting to me and I decided my time was better spend elsewhere.</p>
<p>The rest of that truth lies within the fact that i (without any prior knowledge of Php) was able to complete all the assignments for our Php class within a period of two hours on the final day of school. The fact that despite my love for Flash and ActionScript, I skipped an entire semester of a class teaching Flash and ActionScript deciding I would learn more listening to Lee Brimelow in the library. To be honest I could probably continue for a while, but a lot of these problems can&#8217;t always be attributed to bad Teachers.</p>
<p>College education caters to the masses, and the masses as it seems aren&#8217;t all that interested in learning, or maybe they just weren&#8217;t when I was in College.<br />
We all enjoyed College Life; we knocked back a few beers between classes, played some pool, stressed over homework that was due the next day, so I can understand what keeps students there. The underlying issue here is that most students stayed in school because they loved the college environment and drifted through classes, only taking in what they were taught, and to be honest It&#8217;s as Stacey said, they would be lucky if they retained even 20%.</p>
<p>So what am I still talking about? Well I&#8217;m hoping to impart some advice on what makes a good teacher, from the opinion of somebody that wasn&#8217;t one of the masses, somebody that went to school to learn. These words of wisdom are simply the things that have made the good teachers stand out through out my college eduction.</p>
<p>1) You are granted a tremendous power by teaching, a power to influence somebody&#8217;s life for better or worse. Use this power wisely, I&#8217;ve seen people drop out of school because teachers have suggested it.</p>
<p>2) Please don&#8217;t teach to bring home rent, teach because you want to make a difference, and let the money come as way of you trying to make that difference. You will never have the same impact in a job you don&#8217;t wake up in the morning excited to do. We see it when you don&#8217;t want to be there and as a result we don&#8217;t want to be there either.</p>
<p>3) Id rather you not hold our hands and walk with us through the door, instead show us where the doors are and the interested amongst us will walk through them ourselves, chances are the uninterested students will have forgotten where the door was by the time they walked through it anyway.</p>
<p>4) I&#8217;ll make this one specific so it&#8217;s easier to voice, but it applies in any field. Don&#8217;t spend the entire 14 weeks in a semester trying to drill Actionscript into us, as with any language, If we don&#8217;t speak it on a day to day basis were going to forget. Rather than trying to teach as much of any subject as possible, show us where we can go to find information ourselves, the people we should know, the events we should be going to and the blogs we should be reading.</p>
<p>5) Please don&#8217;t act like your better than us. Some teachers make it a point to show you how awesome they are some will laugh at the idea that a student may know more than they. I&#8217;ve had all kinds of teachers, but I will forever remember the ones who put themselves on the same level as us, not only teaching us but learning from us as well.</p>
<p>Sometimes I look back and I&#8217;m utterly appauled by some of the people we had as teachers, Microsoft Sam reading the web tutorial version of what you were teaching would have been more informative. That being said going to College was one of the best decisions I could have made, and I have a handful of teachers to thank for all the times they inspired us to be more than we were.</p>
<p>Thanks for reading, hope It made a difference,</p>
<p>-Raz</p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/news/dear-teachers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash As3 Event.MOUSE_LEAVE Not Firing.</title>
		<link>http://www.razpeel.com/blog/tutorials/flash-as3-eventmouse_leave-not-firing/</link>
		<comments>http://www.razpeel.com/blog/tutorials/flash-as3-eventmouse_leave-not-firing/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 08:58:33 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[Event.MOUSE_LEAVE]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[MOUSE_LEAVE]]></category>
		<category><![CDATA[MOUSE_LEAVE Broken]]></category>
		<category><![CDATA[MOUSE_LEAVE Issue]]></category>
		<category><![CDATA[MOUSE_LEAVE Not Firing]]></category>
		<category><![CDATA[MOUSE_LEAVE Not Working]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=133</guid>
		<description><![CDATA[Really quick post this time. Wanted to share some recent found knowledge that i wish i had known twenty minutes prior to testing functionality in an RIA earlier on tonight.
1stage.addEventListener&#40;Event.MOUSE_LEAVE, exitHandler&#41;;

    This will not work in the Flash IDE! The  embedded player just never fires the event.
    The [...]]]></description>
			<content:encoded><![CDATA[<p>Really quick post this time. Wanted to share some recent found knowledge that i wish i had known twenty minutes prior to testing functionality in an RIA earlier on tonight.</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_LEAVE</span><span style="color: #000066; font-weight: bold;">,</span> exitHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
<p>
    This will not work in the Flash IDE! The  embedded player just never fires the event.<br />
    The only work around i could find is to publish the swf and view it in a browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/tutorials/flash-as3-eventmouse_leave-not-firing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>As3 CData Binding</title>
		<link>http://www.razpeel.com/blog/tutorials/as3-cdata-binding/</link>
		<comments>http://www.razpeel.com/blog/tutorials/as3-cdata-binding/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 09:15:13 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionSctipt 3]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[CDATA]]></category>
		<category><![CDATA[CDATA Binding]]></category>
		<category><![CDATA[Flash CData]]></category>
		<category><![CDATA[XML Binding]]></category>
		<category><![CDATA[Xml CData]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=106</guid>
		<description><![CDATA[
	I just manged to get some code working that has had me banging my head against the wall for the last couple of hours.
	The goal was simple, send XHTML markup to PHP. Horray says me, should be fairly straight forward!
	I&#8217;ll just pop a &#60;!CDATA[..]]&#62;&#62; tag around the nodes that store the markup so the tags [...]]]></description>
			<content:encoded><![CDATA[<p>
	I just manged to get some code working that has had me banging my head against the wall for the last couple of hours.<br />
	The goal was simple, send <em>XHTML</em> markup to <em>PHP</em>. Horray says me, should be fairly straight forward!<br />
	I&#8217;ll just pop a <em>&lt;!CDATA[..]]&gt;&gt;</em> tag around the nodes that store the markup so the tags will not be parsed.<br />
Then i set off about my usual workflow, and soon enough, i have some actionscript which should be both reading and writing to my <em>.xml</em> file.</p>
<p>Everything looks great, time to test it out!</p>
<p>
	<strong>Problem!</strong>
</p>
<p><div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900; font-style: italic;">// Wraps a single content node with required tags.</span><br />
<span style="color: #009900; font-style: italic;">// Note tag = &quot;Name&quot; &amp; contents = &quot;Raz Peel&quot;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> stringToNode <span style="color: #000000;">&#40;</span>tag<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">,</span> contents<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">XML</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span> <span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;&lt;![CDATA[&quot;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000;">&#123;</span>contents<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;]]&gt;&quot;</span><span style="color: #000066; font-weight: bold;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;/</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
</p>
<p>
	My first element comes out as such.
</p>
<div class="asCode">
<p>
        &lt;<span class="xmlTag">Name</span>&gt;<br />
        + &quot;<br />
        &lt;![CDATA[&quot; + {contents} + &quot;]]&gt;<br />
        &quot; +<br />
        &lt;/<span class="xmlTag">Name</span>&gt;
	</p>
</div>
<p>
	Obviously this is not working at all as it should, i take it my XML isn&#8217;t formatted correctly.<br />
	Back into code I rewrite my function to the follows:
</p>
<p><div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span> <span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span> <span style="color: #000000;">&#123;</span>contents<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;/</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
</p>
<p>
	This result was better, but still very much incorrect.
</p>
<div class="asCode">
<p>
    	&lt;<span class="xmlTag">Name</span>&gt;&lt;![CDATA[ {contents} ]]&gt;&lt;/<span class="xmlTag">Name</span>&gt;
	</p>
</div>
<p>
	The contents variable was being parsed as a string rather than a variable. <br />
	I jumped back into the code to try something else.
</p>
<p><div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span> <span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><span style="color: #990000;">&quot;&lt;![CDATA[&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#123;</span>contents<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#123;</span><span style="color: #990000;">&quot;]]&gt;&quot;</span><span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;/</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
</p>
<p>
	This must work right? Apparantly not, result was:
</p>
<div class="asCode">
<p>
    	&lt;<span class="xmlTag">Name</span>&gt;&amp;lt;![CDATA[ Raz Peel ]]&amp;gt;&lt;/<span class="xmlTag">Name</span>&gt;
	</p>
</div>
<p>
	This is the point where i consulted the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/package-summary.html">Adobe LiveDocs</a><br />
    and then our <a href="http://oreilly.com/catalog/9780596526948/">Essential ActionScript 3.0</a> book. <br />
    Colin, unfortunatley, confirmed that i wasn&#8217;t doing anything wrong, weird! Ten minutes on google found me on <a href="http://jessewarden.com/">Jesse Warden&#8217;s blog</a> reading this <a href="http://jessewarden.com/2007/06/e4x-xml-binding-cdata.html">post</a>. <br />
As such i changed my code to this:</p>
<p><div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339966; font-weight: bold;">function</span> cdata<span style="color: #000000;">&#40;</span>theURL<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">XML</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span> <span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;&lt;![CDATA[&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> theURL <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #990000;">&quot;]]&gt;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span> <span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><span style="color: #000000;">&#123;</span>cdata<span style="color: #000000;">&#40;</span>contents<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&lt;/</span><span style="color: #000000;">&#123;</span>tag<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
</p>
<p>
	Result?
</p>
<div class="asCode">
<p>
    	&lt;<span class="xmlTag">Name</span>&gt;&lt;![CDATA[Raz Peel]]&gt;&lt;/<span class="xmlTag">Name</span>&gt;
	</p>
</div>
<p>
	Yay, success!!! <br /> I&#8217;ve no idea if this is suppose to work like this or not, but it does.<br />
    Thanks for sharing Jesse!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/tutorials/as3-cdata-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Rotating Images (As3)</title>
		<link>http://www.razpeel.com/blog/tutorials/rotating-images/</link>
		<comments>http://www.razpeel.com/blog/tutorials/rotating-images/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 00:31:40 +0000</pubDate>
		<dc:creator>Raz</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[Changing Images]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Image Gallery]]></category>
		<category><![CDATA[Image Loop]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Images Fade In Fade Out]]></category>
		<category><![CDATA[Rotating]]></category>
		<category><![CDATA[Rotating Images]]></category>
		<category><![CDATA[Rotating Images As3]]></category>
		<category><![CDATA[Website Changing Images]]></category>

		<guid isPermaLink="false">http://www.razpeel.com/blog/?p=39</guid>
		<description><![CDATA[
In  the last week of talking in various channels, at least a few people have asked for help with the code to dynamically rotate several images in a loop.


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_rotatingimages_final_1158008936"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimages_final.swf" />
	<param name="play" value="true" />
	<param name="quality" value="high" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimages_final.swf"
			name="fm_rotatingimages_final_1158008936"
			width="500"
			height="500">
		<param name="play" value="true" />
		<param name="quality" value="high" />
	<!--<![endif]-->
		

	
		
	


	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>

  I’ll show you two different ways you can do this, both leading to the same result. [...]]]></description>
			<content:encoded><![CDATA[<p>
In  the last week of talking in various channels, at least a few people have asked for help with the code to dynamically rotate several images in a loop.
</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_rotatingimages_final_1073485527"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimages_final.swf" />
	<param name="play" value="true" />
	<param name="quality" value="high" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimages_final.swf"
			name="fm_rotatingimages_final_1073485527"
			width="500"
			height="500">
		<param name="play" value="true" />
		<param name="quality" value="high" />
	<!--<![endif]-->
		
<p>
	<a href="http://adobe.com/go/getflashplayer"><br />
		<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
	</a>
</p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>
  I’ll show you two different ways you can do this, both leading to the same result. You can look at the method i would use, (which includes the use of <a href="http://code.google.com/p/tweener/">Tweener</a>, and another way using Flash’s built in tween system. </p>
<p>  If you want to follow along using my method, i have a pre-prepared file that you can start with at this <a href="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimagesfla.zip">link.</a><br />
  <span style="font-weight: lighter; font-size: 0.85em;"><em>The images used in this tutorial are not my own, rather by one of my favorite digital artists <a href="http://gallery.artofgregmartin.com/" target="_blank">Greg Martin</a>.</em></span>
</p>
<p>
	<strong><br />
	1) My way, using Tweener</strong>.
</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #009900; font-style: italic;">// import Tweener</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> caurina<span style="color: #000066; font-weight: bold;">.</span>transitions<span style="color: #000066; font-weight: bold;">.</span>Tweener<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// imageNum will hold the current image we are viewing,</span><br />
<span style="color: #009900; font-style: italic;">// imgArray will store a list of all the images in use</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> imageNum<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> imgArray<span style="color: #000066; 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><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #3f5fbf;">/* create a for loop construct to iterate through all the display objects on the stage<br />
the code that loops takes each display object and stores it in our imgArray,<br />
and then changes the alpha value of each one to zero so nothing is visible on screen */</span><br />
<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: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">numChildren</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
imgArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildAt</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
imgArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">alpha</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// create a function called tweenImg. You can then call this function whenever we want the image to change</span><br />
<span style="color: #339966; font-weight: bold;">function</span> tweenImg <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> secondNum<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//define a variable to hold the index of the next image to be shown</span><br />
<br />
<span style="color: #009900; font-style: italic;">//tell Tweener to create a new tween which will wait 1.5 seconds and then set the alpha property of the current image to 0.</span><br />
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>imgArray<span style="color: #000000;">&#91;</span>imageNum<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span> 2<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span> 0<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeOutCubic&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">//check if the current image is the last one in the list. If so, reset the index to 0, otherwise increase the index by 1.</span><br />
<span style="color: #009900; font-style: italic;">//tells the next image to fade in</span><br />
imageNum <span style="color: #000066; font-weight: bold;">&gt;</span>= imgArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">-</span> 1 <span style="color: #000066; font-weight: bold;">?</span> imageNum = 0 <span style="color: #000066; font-weight: bold;">:</span> secondNum = <span style="color: #000066; font-weight: bold;">++</span>imageNum<span style="color: #000066; font-weight: bold;">;</span><br />
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>imgArray<span style="color: #000000;">&#91;</span>secondNum<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span>2<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span> 1<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeOutCubic&quot;</span><span style="color: #000066; font-weight: bold;">,</span> onComplete<span style="color: #000066; font-weight: bold;">:</span>tweenImg<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// start the loop cycle by fading in the first image and calling the tweenImg function when it’s finished.</span><br />
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>imgArray<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span> 1<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span> 1<span style="color: #000066; font-weight: bold;">,</span> onComplete<span style="color: #000066; font-weight: bold;">:</span>tweenImg<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></td></tr></tbody></table></div>
<p>
That’s all! You now have a series of images that all fade in and  then out continuously. Finished files are available at <a href="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimagesfla_finished.zip">this link</a>. </p>
<p>
	<strong>2) The other way, using the bulit in tweening engine.</strong></p>
<p>    I wrote the alternative way of achieving the same result using flash’s own inferior tweening system.<br />
    I&#8217;m not going to post it here though, instead you&#8217;ll find the complete working files for this method, along with the one previously discussed at <a href="http://www.razpeel.com/blog/wp-content/uploads/2009/01/rotatingimagesfla_finished.zip">this link</a>.</p>
<p>Good luck! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.razpeel.com/blog/tutorials/rotating-images/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
