<?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>i-create &#124; therefore-i am</title>
	<atom:link href="http://i-create.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://i-create.org</link>
	<description>i-create &#124; therefore i-am &#124; a blog about opensource technology and rich internet applications</description>
	<lastBuildDate>Thu, 05 Aug 2010 04:19:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Virtual Painting with Hype</title>
		<link>http://i-create.org/2010/08/03/virtual-painting-with-hype/</link>
		<comments>http://i-create.org/2010/08/03/virtual-painting-with-hype/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 04:28:55 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[Generative]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[hype]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=826</guid>
		<description><![CDATA[The hypeframe work is truly a unique library it offers generative artists a new tool to quickly create generative art. I believe it also provides flash developers with a rich actionscript library that does a great deal of heavy lifting. The library allows you to quickly create swarming effects that you can use to create [...]]]></description>
			<content:encoded><![CDATA[<p>The hypeframe work is truly a unique library it offers generative artists a new tool to quickly create generative art.  I believe it also provides flash developers with a rich actionscript library that does a great deal of heavy lifting.  The library allows you to quickly create swarming effects that you can use to create stunning artwork rapidly.  In the example below I am using hype to paint a picture it does this by grabbing the pixel value and then applying it to the canvas.  As a result you can simulate a painting effect that can really turn out stunning results.  This is one of the many things I really like about this library, is how quickly you can create art with it! <br/><br/>Simple Hype Painting Example:<br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvdmlydHVhbF9wYWludGluZy8/S2VlcFRoaXM9dHJ1ZSYjMDM4O1RCX2lmcmFtZT10cnVlJiMwMzg7aGVpZ2h0PTUwMCYjMDM4O3dpZHRoPTYwMA==" class=\"thickbox\" title=\"Virtual Painting with the HypeFramework\"><img src="http://i-create.org/actionscript/virtual_painting/ireland.jpg" alt="HypeFramework Painting Example"/></a><br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvdmlydHVhbF9wYWludGluZy92aXJ0dWFsX3BhaW50aW5nLnppcA==" title=\"Download the Code\">Download Example / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvdmlydHVhbF9wYWludGluZy8/S2VlcFRoaXM9dHJ1ZSYjMDM4O1RCX2lmcmFtZT10cnVlJiMwMzg7aGVpZ2h0PTUwMCYjMDM4O3dpZHRoPTYwMA==" class=\"thickbox\" title=\"Virtual Painting with the HypeFramework\">Launch Demo</a><br/>So what have I been up to lately?  I have really been diving into html5 with webGL coming out soon I think combining html5, webgl, and flash developers will be able to create a whole new breed of rich internet applications.  I have also been shifting my focus on mobile, because it is the only way truly creative developers can rapidly create applications and profit off of them quickly.  It has the lowest barrier of entry and with mobile really starting to take off most applications will have to be completely re-written for these low power, light weight devies that everyone will use.  I am excited about what I see and I believe webGL will be supported in both the iphone, android, and hopefully palm!  I also believe that javascript development will be needed more and more simply because javascript is the glue that holds the web together and it is supported by all mobile platforms.  So you may see a variety of experiments here and I don&#8217;t think of development as javascript vs. actionscipt I just view them as working more together instead of against each other so this is not an HTML5 vs. Flash thing.  I wouldn&#8217;t be surprised one bit by adobe releasing a Flash to Canvas feature for CS6.  What makes flash so compelling to me is the amount of libraries available to developers.  I would also be willing to bet in the near future flash will also support 3d hardware acceleration this would really allow for lots of new games on the flash platform. Not too mention it doesn&#8217;t look like Internet Explorer is going to support any type of 3d in the near future.<br/><br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L21lbW9yaWFsUGFyay8=" target=\"_blank\" title=\"Simple Panoramic with Three.js!\">Simple 3D Panoramic in JavaScript no IE Support!:<br/><img src="http://i-create.org/JavaScript/memorialPark/memorialpark.jpg" alt="Three.js Panoramic"/></a><br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L21lbW9yaWFsUGFyay9tZW1vcmlhbFBhcmsuemlw" target=\"_blank\" title=\"Download the Code\">Download Example / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L21lbW9yaWFsUGFyay8=" target=\"_blank\" title=\"Simple Panoramic with Three.js!\">Launch Demo</a><br/>So you showed me some actionscipt can you show me some javascript?  Of course, I have been playing around a little with three.js.  As you can see above I built a simple panoramic sphere with javascript Mr. Doob created a really cool 3-D library that has lots of similar characteristics too PaperVision3D and it has some basic primitives so it makes it really easy to work with.  I will warn you ahead of time this example is a processor hog and it runs really, really slow, but it is some where to start.  JavaScript libraries are still a long way from where ActionScript is right now.  I have been working on a new version of my memorial panoramic with flash, only it will have 3-D sound that will be dynamically created by user interaction so stop by in about a month.<br/><br/>Simple HTML5 Example Chrome or Safari only!:<br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3NjOS8=" target=\"_blank\" title=\"simple HTML5 Example with Processing and jQuery\"><img src="http://i-create.org/JavaScript/sc9/simpleHTML5.jpg" alt="Three.js Panoramic"/></a><br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3NjOS9zYzkuemlw" title=\"Download the Code\">Download Example</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3NjOS8=" target=\"_blank\" title=\"simple HTML5 Example with Processing and jQuery\">Launch Demo</a><br/><br/>It will be interesting to see if the new devies start to have more hardware acceleration for the canvas.  It&#8217;s funny for as much as apple touts HTML5 it really runs slow on the iPhone and iPod and you can&#8217;t get a good read out on the emulator in that comes with the apple sdk so it is a let down.  Example, I was working on video game that runs at about 40-45 frames per second on the laptop emulator but when I actually place it on the iPhone it drops down to about 4 frames per second just enough to be useless.  So I hope they speed up the rendering on these devices.  I believe google will help drive that competition.  Google will be coming out with competing <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5wY3dvcmxkLmNvbS9hcnRpY2xlLzIwMjM0Ny9sZXRfdGhlX3NhbXN1bmdfZ2FsYXh5X3RhYmxldF9oeXBlX2JlZ2luLmh0bWw=" title=\"google tablets\" target=\"_blank\">tablets</a>, phones, and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5nb29nbGUuY29tL3R2Lw==" title=\"Google TV\" target=\"_blank\">TV set top boxes</a>. <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2dpZ2FvbS5jb20vMjAxMC8wNS8xMi9mcm95by1zcGVlZC1hbmRyb2lkLw==" title=\"froyo\" target=\"_blank\">Froyo will be on all these devices and it is a significant speed boost</a> not too mention it supports flash!  I am really interested though in the future of webGL with flash on devices because, I know this combination will enable developers to create some really cool experiences and games for mobile devices.  JavaScript also lacks a true sound api.  With flash not only can I play sounds mp3 etc.. I can also create sound from scratch and manipulate that sound just one of the many advantages of the Flash Platform.<br/><br/>Cool Flash Libraries:<br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVmcmFtZXdvcmsub3Jn" title=\"HypeFramework\" target=\"_blank\">HypeFramework</a><br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zb25vcG9ydC5jb20v" title=\"sonoport\" target=\"_blank\">Sonoport</a><br/> <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5iaXQtMTAxLmNvbS9ibG9nLz9wPTI2NjA=" title=\"Bit-101 sound synthesis has an excllent article series on sound synthesis\" target=\"_blank\">Bit-101 sound synthesis</a><br/>Cool JavaScript Libraries:<br/><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5waG9uZWdhcC5jb20v" title=\"phonegap\" target=\"_blank\">PhoneGap</a><br/> <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2JyaWFubGVyb3V4LmdpdGh1Yi5jb20vbGF3bmNoYWlyLw==" title=\"LawnChair JS\" target=\"_blank\">Lawnchair</a><br/> <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcv" title=\"processingJS\" target=\"_blank\">Processing</a><br/> <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vbXJkb29iL3RocmVlLmpzLw==" title=\"three JS\" target=\"_blank\">three</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=826" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F08%2F03%2Fvirtual-painting-with-hype%2F&amp;linkname=Virtual%20Painting%20with%20Hype"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/08/03/virtual-painting-with-hype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 jQuery jqPanoramic Plugin Alpha</title>
		<link>http://i-create.org/2010/06/01/html5-jquery-jqpanoramic-plugin-alpha/</link>
		<comments>http://i-create.org/2010/06/01/html5-jquery-jqpanoramic-plugin-alpha/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:24:09 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Panoramic]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/06/01/html5-jquery-jqpanoramic-plugin-alpha/</guid>
		<description><![CDATA[A simple jQuery plugin that allows for creation of Cubic Panoramic Images. This plugin utilizes on CSS3 3D transfoms to complete this task it also relies on jQuery UI. This plugin is an alpha and currently only works for Safari Nightly builds it has been tested against on an Apple running the latest webkit nightly [...]]]></description>
			<content:encoded><![CDATA[<p>A simple jQuery plugin that allows for creation of Cubic Panoramic Images.  This plugin utilizes on <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3dlYmtpdC5vcmcvYmxvZy8zODYvM2QtdHJhbnNmb3Jtcy8=" target=\"_blank\" title=\"3D in CSS on Webkit\" >CSS3 3D transfoms</a> to complete this task it also relies on jQuery UI.  This plugin is an alpha and currently only works for <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL25pZ2h0bHkud2Via2l0Lm9yZy8=" target=\"_blank\" title=\"Get a Nightly Build\" >Safari Nightly builds</a> it has been tested against on an Apple running the latest webkit nightly build on Snow Leopard.  This plugin should also be compatible for the iPad although I have not had time to test it yet.  I will be adding more features to this plugin on a semi weekly basis.  I am an extremely busy person and if you email me for support it might take me awhile to respond.  Cubic panoramics have long been available in Flash and Java.  The reason for creating this was simply to test out the new CSS3 3D properties and hopefully to make a great plugin that will work well on the iPad so users can view panoramics easily on their mobile devices.</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2pxUGFub3JhbWljLw==" title=\"jqPanoramic HTML5 Cubic Panoramic Plugin for jQuery\" target=\"_blank\">This plugin requires a WebKit Nightly Build<br />
<img src="http://i-create.org/JavaScript/jqPanoramic/sc9Panoramic.png"></a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jqPanoramic jQuery plugin usage example <span style="color: #339933;">-&gt;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jqPanoramic</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
dHeight<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;640&quot;</span><span style="color: #339933;">,</span>
dWidth<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;1600&quot;</span><span style="color: #339933;">,</span>
cubeSide1<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://i-create.org/JavaScript/jqPanoramic/cubicSide1.jpg&quot;</span><span style="color: #339933;">,</span>
cubeSide2<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://i-create.org/JavaScript/jqPanoramic/cubicSide2.jpg&quot;</span><span style="color: #339933;">,</span>
cubeSide3<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://i-create.org/JavaScript/jqPanoramic/cubicSide3.jpg&quot;</span><span style="color: #339933;">,</span>
cubeSide4<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://i-create.org/JavaScript/jqPanoramic/cubicSide4.jpg&quot;</span><span style="color: #339933;">,</span>
cubeTop<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://i-create.org/JavaScript/jqPanoramic/top.jpg&quot;</span><span style="color: #339933;">,</span>
cubeBottom<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://i-create.org/JavaScript/jqPanoramic/bottom.jpg&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">//or for the default example just</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">jqPanoramic</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2pxUGFub3JhbWljL2pxUGFub3JhbWljLnppcA==" title=\"jqPanoramic HTML5 Cubic Panoramic Plugin for jQuery\">Download Plugin</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2pxUGFub3JhbWljLw==" title=\"jqPanoramic HTML5 Cubic Panoramic Plugin for jQuery Example\" target=\"_blank\">Launch Plugin Example</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=822" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F06%2F01%2Fhtml5-jquery-jqpanoramic-plugin-alpha%2F&amp;linkname=HTML5%20jQuery%20jqPanoramic%20Plugin%20Alpha"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/06/01/html5-jquery-jqpanoramic-plugin-alpha/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tweet Tank in Away3D and Hype pt. 2</title>
		<link>http://i-create.org/2010/05/16/away3d-with-hype-fish-tank-part-2/</link>
		<comments>http://i-create.org/2010/05/16/away3d-with-hype-fish-tank-part-2/#comments</comments>
		<pubDate>Mon, 17 May 2010 04:09:11 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[data visualization]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/05/16/away3d-with-hype-fish-tank-part-2/</guid>
		<description><![CDATA[I have now added support to search twitter. Once you search twitter it repopulates the fish bowl with fish that once clicked will navigate to that twitter search result. I have been working on optimizing the content. Specifically the fish models are very processor intensive. I have been looking at different ways to improve this. [...]]]></description>
			<content:encoded><![CDATA[<p>I have now added support to search twitter.  Once you search twitter it repopulates the fish bowl with fish that once clicked will navigate to that twitter search result.  I have been working on optimizing the content.  Specifically the fish models are very processor intensive.  I have been looking at different ways to improve this.  Away3Dlite is new than the other versions and it does have many benefits.  The main build has other techniques like level of detail and fogging.  These help to reduce the over all processor hit.  I believe in the near future some of these features will hopefully be ported over to the Away3Dlite version if not then within in the next couple of weeks I will port this over.  I think utilizing fogging and level of detail will greatly reduce the overall processor hit. </p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLw==" title=\"TweetTank\" target=\"_blank\">Processor Intensive Experiment:<br />
<img src="http://i-create.org/actionscript/TweetTank/TweetTankAS.jpg" title="Tweet Tank" /><br />
</a></p>
<p>You will notice that when it renders it is rendering 110+ DisplayObject3D I have also been working on Garbage Collection I have found that after doing several searches the Memory is increasing greatly.  So I have added some techniques like removing the objects and then nullifying them although it doesn&#8217;t appear to be helping much.  I will have to look into this again soon.  I would also like to super impose a Google map on the top make it click-able and then have the camera zoom in on that particular fish which should not really be difficult at all because I can use tween lite to simply zoom the camera to the objects position.  So I am not done with this and I will be revisiting these issues.  Memory management can be difficult.  I will also be scouring the web for flash tools that help profile and reduce memory so if anyone has any suggestions feel free to chime in. I have also been reading the 3D in Flash Book from Friends of Ed it does have a whole chapter on optimizing 3D content for the web so I will be reading that chapter soon.  I have also been looking at gSkinners blog it has a considerable amount in <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5nc2tpbm5lci5jb20vYmxvZy9hcmNoaXZlcy8yMDA2LzA2L2FzM19yZXNvdXJjZV9tYS5odG1s" title=\"gSkinner on Memory Management\" target=\"_blank\">regards to memory management</a>.<br />
The Source Code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundChannel</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #0066CC;">System</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TweetTank <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> twitterFish:tweetFish;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> searchClipGo:searchClip = <span style="color: #000000; font-weight: bold;">new</span> searchClip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">sound</span>:<span style="color: #0066CC;">Sound</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> musicChannel;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> TweetTank<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			playMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			twitterFish=<span style="color: #000000; font-weight: bold;">new</span> tweetFish;
			addChild<span style="color: #66cc66;">&#40;</span>twitterFish<span style="color: #66cc66;">&#41;</span>;
			twitterFish._twitSearch = <span style="color: #ff0000;">&quot;Flash&quot;</span>;
			twitterFish.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			twitterFish.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			addChild<span style="color: #66cc66;">&#40;</span>searchClipGo<span style="color: #66cc66;">&#41;</span>;
			searchClipGo.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">250</span>;
			searchClipGo.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">30</span>;
			searchClipGo.<span style="color: #006600;">btnSearch</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, TweetSearch<span style="color: #66cc66;">&#41;</span>;
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> TweetSearch<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//trace(searchClipGo.txtSearch.text);</span>
			<span style="color: #0066CC;">try</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">twitterFish</span>.<span style="color: #006600;">killAll</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">twitterFish</span>.<span style="color: #006600;">xMove</span> = <span style="color: #000000; font-weight: bold;">null</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">twitterFish</span>.<span style="color: #006600;">twFishOne</span> = <span style="color: #000000; font-weight: bold;">null</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">twitterFish</span> = <span style="color: #000000; font-weight: bold;">null</span>;
			twitterFish=<span style="color: #000000; font-weight: bold;">new</span> tweetFish;
			addChild<span style="color: #66cc66;">&#40;</span>twitterFish<span style="color: #66cc66;">&#41;</span>;
			twitterFish._twitSearch  = searchClipGo.<span style="color: #006600;">txtSearch</span>.<span style="color: #0066CC;">text</span>;
			twitterFish.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			twitterFish.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
			addChild<span style="color: #66cc66;">&#40;</span>searchClipGo<span style="color: #66cc66;">&#41;</span>;
			searchClipGo.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">250</span>;
			searchClipGo.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">30</span>;
			searchClipGo.<span style="color: #006600;">btnSearch</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, TweetSearch<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">System</span>.<span style="color: #006600;">gc</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// the GC will perform a full mark/sweep on the second call.</span>
			<span style="color: #66cc66;">&#125;</span><span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span>fail:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">//trace(fail);</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> playMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">sound</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Sound</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;test.mp3&quot;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
			musicChannel=<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">int</span>.<span style="color: #0066CC;">MAX_VALUE</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">try</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
			<span style="color: #66cc66;">&#125;</span><span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				musicChannel.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SOUND_COMPLETE</span>, loopMusic<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			musicChannel.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SOUND_COMPLETE</span>, loopMusic<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> loopMusic<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>musicChannel<span style="color: #66cc66;">!</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
				playMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">containers</span>.<span style="color: #006600;">ObjectContainer3D</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">materials</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">materials</span>.<span style="color: #006600;">WireColorMaterial</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Cube6</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">templates</span>.<span style="color: #006600;">BasicTemplate</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">core</span>.<span style="color: #006600;">base</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">core</span>.<span style="color: #006600;">utils</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> twFish.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> twTank.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> RSSJSONW;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">theflashblog</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Math2</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">XMLUtil</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">serialization</span>.<span style="color: #006600;">json</span>.<span style="color: #006600;">JSON</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">syndication</span>.<span style="color: #006600;">rss</span>.<span style="color: #006600;">Item20</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">syndication</span>.<span style="color: #006600;">rss</span>.<span style="color: #006600;">RSS20</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IOErrorEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">SecurityErrorEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">navigateToURL</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequestMethod</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #006600;">Security</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">KeyboardEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">ui</span>.<span style="color: #006600;">Keyboard</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Vector3D</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">BlendMode</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">GlowFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundChannel</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #0066CC;">System</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> gs.<span style="color: #006600;">TweenLite</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">FunctionTracker</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">layout</span>.<span style="color: #006600;">GridLayout</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #006600;">SoundAnalyzer</span>;
&nbsp;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> tweetFish <span style="color: #0066CC;">extends</span> BasicTemplate <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> origin:Vector3D=<span style="color: #000000; font-weight: bold;">new</span> Vector3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">40</span>,<span style="color: #cc66cc;">900</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> twFishOne:TwFish1;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> twTankC:TwTank1;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> soundAnalyzer:SoundAnalyzer;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> myX:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;">0</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> layout:GridLayout;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> Tank:ObjectContainer3D;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> xMove:FunctionTracker;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _twitSearch:<span style="color: #0066CC;">String</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> xScaleTracker:FunctionTracker;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> yScaleTracker:FunctionTracker;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> zScaleTracker:FunctionTracker;
		<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> myRSS:RSSJSONW;
		Security.<span style="color: #006600;">loadPolicyFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://twitter.com/crossdomain.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
		Security.<span style="color: #0066CC;">allowInsecureDomain</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span>;
		Security.<span style="color: #0066CC;">allowDomain</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> myTimer:Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> colourScheme:<span style="color: #0066CC;">Array</span>=<span style="color: #66cc66;">&#91;</span>0x18b849,0x1858b8,0x18b81c,0x18b89c,0xb818b2,0xfd02f4,0x3102fd,0x02b3fd,0x1afd02,0xf4fd02,0xfd02f4,0x3102fd,0x02b3fd,0x1afd02,0xf4fd02<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> tweetFish<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_WHEEL</span>, onMouseWheelEvent, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> filterA:<span style="color: #0066CC;">Array</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span>  ;
			filterA.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> GlowFilter<span style="color: #66cc66;">&#40;</span>0xFFFFFF, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">19</span>, <span style="color: #cc66cc;">19</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> blur:BlurFilter = <span style="color: #000000; font-weight: bold;">new</span> BlurFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			blur.<span style="color: #006600;">blurX</span>=<span style="color: #cc66cc;">900</span>;
			blur.<span style="color: #006600;">blurY</span>=<span style="color: #cc66cc;">900</span>;
			filterA.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>blur<span style="color: #66cc66;">&#41;</span>;
			soundAnalyzer = <span style="color: #000000; font-weight: bold;">new</span> SoundAnalyzer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			soundAnalyzer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			layout=<span style="color: #000000; font-weight: bold;">new</span> GridLayout<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">900</span>,-<span style="color: #cc66cc;">175</span>,<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span>;
			Tank = <span style="color: #000000; font-weight: bold;">new</span> ObjectContainer3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>Tank<span style="color: #66cc66;">&#41;</span>;
			Tank.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent3D.<span style="color: #006600;">MOUSE_MOVE</span>, goFish,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			twTankC=<span style="color: #000000; font-weight: bold;">new</span> TwTank1<span style="color: #66cc66;">&#40;</span>view<span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>twTankC<span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">mouseEnabled</span>=<span style="color: #000000; font-weight: bold;">true</span>;
			jsonInit<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://search.twitter.com/search.json?q=&quot;</span> + _twitSearch<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span>=-<span style="color: #cc66cc;">2000</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">1600</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">400</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">lookAt</span><span style="color: #66cc66;">&#40;</span> origin <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,_checkMouseEventTrail,<span style="color: #000000; font-weight: bold;">false</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, keyDown, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> jsonInit<span style="color: #66cc66;">&#40;</span>siteFeed:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
				myRSS = <span style="color: #000000; font-weight: bold;">new</span> RSSJSONW<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;;
				myRSS._data = <span style="color: #ff0000;">&quot;&quot;</span>;
				myRSS._txtURL = siteFeed;
				myRSS.<span style="color: #006600;">onJSON</span><span style="color: #66cc66;">&#40;</span>myRSS._txtURL<span style="color: #66cc66;">&#41;</span>;
				myTimer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				myTimer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;timer&quot;</span>, timedFunction<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> timedFunction<span style="color: #66cc66;">&#40;</span>eventArgs:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>myRSS._IsReady == <span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					myTimer.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;	
					addFish<span style="color: #66cc66;">&#40;</span>myRSS<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">//Really Helpful for tracing events!	</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> _checkMouseEventTrail<span style="color: #66cc66;">&#40;</span>$e:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> p:<span style="color: #66cc66;">*</span> =$e.<span style="color: #0066CC;">target</span>;
			<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
				<span style="color: #808080; font-style: italic;">//trace(&quot;&gt;&gt;&quot;, p.name,&quot;: &quot;,p);</span>
				p=p.<span style="color: #006600;">parent</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> killAll<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			xMove.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			xScaleTracker.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			yScaleTracker.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			zScaleTracker.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			xScaleTracker = <span style="color: #000000; font-weight: bold;">null</span>;
			yScaleTracker = <span style="color: #000000; font-weight: bold;">null</span>;
			zScaleTracker = <span style="color: #000000; font-weight: bold;">null</span>;
			view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>twFishOne<span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>twTankC<span style="color: #66cc66;">&#41;</span>;
			xMove = <span style="color: #000000; font-weight: bold;">null</span>;
			twTankC = <span style="color: #000000; font-weight: bold;">null</span>;
			twFishOne = <span style="color: #000000; font-weight: bold;">null</span>;
			<span style="color: #0066CC;">System</span>.<span style="color: #006600;">gc</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Killed&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addFish<span style="color: #66cc66;">&#40;</span>myRSS:RSSJSONW<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//trace(myRSS._twdata.length);</span>
			<span style="color: #000000; font-weight: bold;">var</span> numFish:<span style="color: #0066CC;">Number</span>;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>myRSS._twdata.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&gt;</span>= <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				numFish = <span style="color: #cc66cc;">6</span>;
			<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
				numFish = myRSS._twdata.<span style="color: #0066CC;">length</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i<span style="color: #66cc66;">&lt;</span>numFish; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">//trace(view);</span>
				twFishOne=<span style="color: #000000; font-weight: bold;">new</span> TwFish1<span style="color: #66cc66;">&#40;</span>view<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">!</span>=<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					twFishOne.<span style="color: #006600;">x</span>=i<span style="color: #66cc66;">*</span>randRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">400</span><span style="color: #66cc66;">&#41;</span>;
					twFishOne.<span style="color: #006600;">y</span>=i<span style="color: #66cc66;">*</span>randRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">400</span><span style="color: #66cc66;">&#41;</span>;
					twFishOne.<span style="color: #006600;">z</span>=i<span style="color: #66cc66;">*</span>randRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">400</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
				<span style="color: #000000; font-weight: bold;">var</span> baseFrequency:uint = <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">90</span> <span style="color: #66cc66;">%</span> <span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>;
				xMove=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scale&quot;</span>,dancingFish,<span style="color: #66cc66;">&#91;</span>i,twFishOne<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
				xMove.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #808080; font-style: italic;">//trace(twFishOne.x);</span>
				<span style="color: #808080; font-style: italic;">//var fishy:Object3D=twFishOne;</span>
				<span style="color: #808080; font-style: italic;">//twFishOne.clipContainer.addChild(twFishOne);</span>
				<span style="color: #808080; font-style: italic;">//twFishOne.addChild(twFishOne);</span>
				view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>twFishOne<span style="color: #66cc66;">&#41;</span>;
&nbsp;
				twFishOne.<span style="color: #0066CC;">name</span>=i.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				<span style="color: #808080; font-style: italic;">//fishy.layer.blendMode = BlendMode.ADD;</span>
				twFishOne.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent3D.<span style="color: #006600;">MOUSE_DOWN</span>, goFish,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #0066CC;">System</span>.<span style="color: #006600;">gc</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> goFish<span style="color: #66cc66;">&#40;</span>event:MouseEvent3D<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//trace(myRSS._twdata[int(event.currentTarget.name)]);		</span>
			<span style="color: #000000; font-weight: bold;">var</span> myURL:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>myRSS._twdata<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">currentTarget</span>.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			navigateToURL<span style="color: #66cc66;">&#40;</span>myURL<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onMouseWheelEvent<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//trace(event.delta);</span>
			TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #66cc66;">&#123;</span>z: event.<span style="color: #006600;">delta</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">500</span> + <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span>,<span style="color: #0066CC;">onUpdate</span>: onCameraMove<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> keyDown<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:KeyboardEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//trace(e);</span>
			<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">keyCode</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">32</span> :
					moveCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
					<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> randRange<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">min</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">max</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// Generate a number between and including min - max</span>
			<span style="color: #000000; font-weight: bold;">var</span> randomNum:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">floor</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>max-<span style="color: #0066CC;">min</span>+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0066CC;">min</span>;
			<span style="color: #b1b100;">return</span> randomNum;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> dancingFish<span style="color: #66cc66;">&#40;</span>i:uint, twFishOne:TwFish1<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> baseFrequency:uint = <span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">%</span> <span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>;
			<span style="color: #808080; font-style: italic;">//trace(baseFrequency + &quot;-Beat&quot;);</span>
			xScaleTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scaleX&quot;</span>,soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>,<span style="color: #66cc66;">&#91;</span>baseFrequency,baseFrequency+<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			yScaleTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scaleY&quot;</span>,soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>,<span style="color: #66cc66;">&#91;</span>baseFrequency,baseFrequency+<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			zScaleTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scaleZ&quot;</span>,soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>,<span style="color: #66cc66;">&#91;</span>baseFrequency,baseFrequency+<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span>twFishOne, <span style="color: #cc66cc;">5</span>, <span style="color: #66cc66;">&#123;</span>x:twFishOne.<span style="color: #006600;">x</span> + <span style="color: #cc66cc;">50</span>, y:twFishOne.<span style="color: #006600;">y</span> + <span style="color: #cc66cc;">50</span>, z:twFishOne.<span style="color: #006600;">z</span> + <span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			xScaleTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			yScaleTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			zScaleTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> moveCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//trace(&quot;In Move Camera&quot;);</span>
			TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span>
			                    <span style="color: #0066CC;">camera</span>, 
			                    <span style="color: #cc66cc;">4</span>, 
			                    <span style="color: #66cc66;">&#123;</span>
			                        x: Math2.<span style="color: #006600;">rand</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">9000</span>, <span style="color: #cc66cc;">9000</span><span style="color: #66cc66;">&#41;</span>,
			                        y: Math2.<span style="color: #006600;">rand</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">9000</span>, <span style="color: #cc66cc;">9000</span><span style="color: #66cc66;">&#41;</span>,
			                        z: <span style="color: #cc66cc;">1400</span> + Math2.<span style="color: #006600;">rand</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">9800</span>, <span style="color: #cc66cc;">9000</span><span style="color: #66cc66;">&#41;</span>,
			                        delay: <span style="color: #cc66cc;">2</span>,
			                        <span style="color: #0066CC;">onUpdate</span>: onCameraMove
			                    <span style="color: #66cc66;">&#125;</span>
			                <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCameraMove<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">lookAt</span><span style="color: #66cc66;">&#40;</span> origin <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		override protected <span style="color: #000000; font-weight: bold;">function</span> onPreRender<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			Tank.<span style="color: #006600;">rotationY</span>++;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLnppcA==" title=\"TweetTank\">Download Code</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLw==" title=\"TweetTank Away3D with Hype on Flash\" target=\"_blank\">Launch Experiment</a></p>
<p>I also like what I have been seeing in the WebGL community.  I think it would be really cool if haXe created a library for exporting to webGL/JavaScript I think this would have many benefits namely I could use my Away3D skills and export to webGL.  They do currently export to Canvas but at this time I am not aware of any WebGL support within haXe.  HaXe does support openGL for use in its vitual machine Neko so it seems that a library will likely be available soon.</p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=819" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F05%2F16%2Faway3d-with-hype-fish-tank-part-2%2F&amp;linkname=Tweet%20Tank%20in%20Away3D%20and%20Hype%20pt.%202"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/05/16/away3d-with-hype-fish-tank-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WebGL Rendering of BSP Maps</title>
		<link>http://i-create.org/2010/05/14/webgl-renering-of-bsp-maps/</link>
		<comments>http://i-create.org/2010/05/14/webgl-renering-of-bsp-maps/#comments</comments>
		<pubDate>Fri, 14 May 2010 23:42:21 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Quake]]></category>
		<category><![CDATA[webGL]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/05/14/webgl-renering-of-bsp-maps/</guid>
		<description><![CDATA[It has never been a better time to be a developer. I am really looking forward to full implementations of HTML5 everywhere I believe HTML5 / JavaScript / ActionScript will be an extremly potent combination! I believe their will be proliferation of new devices in the mobile arena. JavaScript and HTML are also becoming more [...]]]></description>
			<content:encoded><![CDATA[<p>It has never been a better time to be a developer.  I am really looking forward to full implementations of HTML5 everywhere I believe  HTML5 / JavaScript / ActionScript will be an extremly potent combination!  I believe their will be proliferation of new devices in the mobile arena.  JavaScript and HTML are also becoming more powerful.  I have been reading about WebGL and experimenting with it for awhile now and the other day I heard about <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJpZXJhLmNvbS9jb3BwZXJjdWJlL2luZGV4Lmh0bWw=" title=\"CopperCube by Ambiera\" target=\"_blank\">CopperCube by Ambiera</a> based off of the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2lycmxpY2h0LnNvdXJjZWZvcmdlLm5ldC8=" title=\"Irrlicht Engine\" target=\"_blank\">Irrlicht Engine</a> and I was immediately curious.  It is basically a world editor / game engine for the web that supports Flash and WebGL output.  I have to be honest I think for Flash, I will definitely stick with Away3D.  For WebGL output I am extremely impressed It was easy to use and in the next few months, I will be studying their web <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJpZXJhLmNvbS9jb3BwZXJsaWNodC9pbmRleC5odG1s" title=\"Copperlicht WebGL\" target=\"_blank\">javascript api copperlicht</a>.  Here are a couple examples of scenes I was easily able to export out with CopperCube.  This stuff can also of course be done with Flash.  You can run Quake in flash using Alchemy.  Alchemy is an extremly innovative software project if you are not familiar with it by now I suggest looking at it.  I have found Bruce Jawn&#8217;s <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2JydWNlLWxhYi5ibG9nc3BvdC5jb20vc2VhcmNoL2xhYmVsL0FsY2hlbXk=" title=\"Bruce Jawn Alchemy\" target=\"_blank\">website</a> to be insightful not only on <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xhYnMuYWRvYmUuY29tL3RlY2hub2xvZ2llcy9hbGNoZW15Lw==" title=\"What is Alchemy?\" target=\"_blank\">Alchemy</a> but also in regards to <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2JydWNlLWxhYi5ibG9nc3BvdC5jb20vc2VhcmNoL2xhYmVsL3JheS1jYXN0aW5n" title=\"Raycasting in Flash\" target=\"_blank\">Raytracing</a> with flash.</p>
<p>You will only be able to see the example below if you have a webGL compatiable browser.  <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy9pbmRleC5waHAvdHV0b3JpYWxzL3R1dG9yaWFsLTEtYnJvd3NlcnMv" title=\"WebGL browser how to\" target=\"_blank\">Here are instructions on how to get a webGL browser.</a></p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3F1YWtlLw==" target=\"_blank\" title=\"WebGL Quake Map\">Click Here to View<br />
<img src="http://i-create.org/JavaScript/quake/quakeMap1.jpg" title="Quake Map in JavaScript" /><br />
</a></p>
<p>To create the environment that are displayed above it was easy. I was able to download Quake3 maps from a few sites like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2x2bHdvcmxkLmNvbS8=" title=\"lvlworld BSP Maps\" target=\"_blank\">lvlworld</a> or <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5tYXAtZmFjdG9yeS5vcmcvcXVha2UtMy8=" title=\"Map-Factory BSP Maps\" target=\"_blank\">Map Factory</a>.  Once the maps have been downloaded and unzipped notice that it has a .pk3 extension change it to a zip file and then extract it.  You will find all you need in that folder from their all you have to do to get it into CopperCube is navigate to the folder named Map and select the .bsp file and from that point on you are good to go.  I have also been attempting to convert these files to <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL25lbWVzaXMudGhld2F2ZWxlbmd0aC5uZXQvaW5kZXgucGhwP3A9NDY=" title=\"Convert .BSP files to .OBJ\" target=\"_blank\">OBJ</a> and then bring them into <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL3ByZWZhYi8=" title=\"PreFab\" target=\"_blank\">PreFab</a>.  I will keep you all posted on the updates as I progress.</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3F1YWtlL1EyLw==" title=\"WebGl Quake Map\" target=\"_blank\">Click Here to View<br />
<img src="http://i-create.org/JavaScript/quake/quakeMap2.jpg" title="Quake Map in JavaScript" /><br />
</a></p>
<p>WebGL Libraries:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2MzZGwub3Jn" title=\"C3DL -> Canvas #D Library&#8221; target=&#8221;_blank&#8221;>C3DL</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJpZXJhLmNvbS9jb3BwZXJsaWNodC9pbmRleC5odG1s" title=\"Copperlicht WebGL\" target=\"_blank\">Copperlicht</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jdWJpY3ZyLm9yZy8=" title=\"CubicVR\" target=\"_blank\">CubicVR</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuZXJnaXplLmNjLw==" title=\"Energize\" target=\"_blank\">Energize</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5nbGdlLm9yZy8=" title=\"GLGE\" target=\"_blank\">GLGE</a></p>
<p>WebGL / HTML5 Links:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xlYXJuaW5nd2ViZ2wuY29tL2Jsb2cv" title=\"Learning WebGL\" target=\"_blank\">Learning WebGL</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zYXRpbmUub3JnL2FyY2hpdmVzLzIwMDkvMDcvMTEvc25vdy1zdGFjay1pcy1oZXJlLw==" title=\"HTML5 3D Gallery\" target=\"_blank\">HTML5 3D Gallery</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3RoZWJhY2tidXR0b24uY29tL3Bvc3Rfb2xkYmxvZ3Bvc3RfODY=" title=\"HTML5 Planes and Cubes\" target=\"_blank\">HTML5 Planes and Cubes</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3BhdWxiYWthdXMuY29tLzIwMDgvMDUvMzEvY292ZXJmbG93LWFueW9uZS8=" title=\"Coverflow in JavaScript\" target=\"_blank\">JavaScript Coverflow</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL25ldC50dXRzcGx1cy5jb20vdGFnL3ByZW1pdW0v" title=\"Nettuts Premium Tutorial on CSS3 Cubes\" target=\"_blank\">CSS3 Cube NetTuts Premium Tutorial</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=816" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F05%2F14%2Fwebgl-renering-of-bsp-maps%2F&amp;linkname=WebGL%20Rendering%20of%20BSP%20Maps"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/05/14/webgl-renering-of-bsp-maps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I love that idea!</title>
		<link>http://i-create.org/2010/05/13/i-love-that-idea/</link>
		<comments>http://i-create.org/2010/05/13/i-love-that-idea/#comments</comments>
		<pubDate>Thu, 13 May 2010 23:39:14 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/05/13/i-love-that-idea/</guid>
		<description><![CDATA[Show support submit a work of Public / Weblic Art in the comments to this blog post. We should respond using the Heart as an artistic symbol much in the same way Chicago had their CowParade. The adobe community should respond virally through the use of the web as a means to communicate. So I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://wwwimages.adobe.com/www.adobe.com/choice/images/marquee_792x200.jpg" style="width:320px" /></p>
<p>Show support submit a work of <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9QdWJsaWNfYXJ0" title=\"What is public art?\" target=\"_blank\">Public /  Weblic Art</a> in the comments to this blog post.  We should respond using the Heart as an artistic symbol much in the same way <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Db3dQYXJhZGU=" title=\"CowParade\" target=\"_blank\">Chicago had their CowParade</a>.  The adobe community should respond virally through the use of the web as a means to communicate.  So I would encourage anyone to simply create a flash, html5, after effects, processing, context free art, whatever medium you want in response to Apple&#8217;s recent changes in heart in regards to thinking different.  Post the art work on the web then comment back.  Show the world what you created it and how you created it.  Share your code / art / and source files because that is how the community progresses.</p>
<p>I think the Adobe community is primarily comprised of artist, designers, publishers, developers, etc..  In short I think they are the most creative people on the net.  I would like to see what their unified response would look like.  I think it would make for a really cool gallery.  So create something and share it.</p>
<p><object width="320"><param name="movie" value="http://www.youtube.com/v/iBzVGWWpZAw&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/iBzVGWWpZAw&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320"></embed></object></p>
<p>Why?  Because it is really about choice.  I pick the programs and place them on the machine.  I use it however, I like.  I do not need some foreign body that decides what software to use and how to use it.  Is everyone sleeping or am I the only one that is intimidated of that concept? I don&#8217;t want too have some wizard of oz tell me what to put on my device or computer that is my decision for better or worse.  I personally would like the option to have <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PTV5TzJLUUhrdDRB" title=\"Andriod running on the iPhone\" target=\"_blank\">multiple operating systems</a> on my cell phone if that is a possibility without voiding my warranty.  I am the user, I am the owner, I pick what goes on and how not some governmental official or CEO.  That is my concern why can&#8217;t you clarify your policy at least so can I not use the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Fuc2NhbW9iaWxlLmNvbS9jb3JvbmEv" title=\"Corona SDK\" target=\"_blank\">Corona SDK</a> what if I want to use <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2hheGUub3JnLw==" title=\"haXe\" target=\"_blank\">haXe</a>?  I believe that if someone owns the device the device owner should have the end all say on what goes on it and what doesn&#8217;t.  Why can&#8217;t users have the choice to download and use things like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy50ZWNoaS5jb20vMjAxMC8wNC9hbGFuLWtheS1ub3RlYm9vay1ndXJ1LXRha2VzLXNjcmF0Y2gtdG8tYXBwbGUv" title=\"What is Scratch?\" target=\"_blank\">Scratch</a>?</p>
<p>&#8220;It doesn’t make much difference how the paint is put on as long as something has been said. Technique is just a means of arriving at a statement.&#8221; -Jackson Pollock</p>
<p>As the creators we should be able to pick whatever programming language etc and run it on the device.  It is up to the consumer to choose what they want and what works out best for them on that device.  Create something cool in the shape of a heart tell the community how you created it and share it.  </p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3R3aXR0ZXIuY29tL2loZWFydGNob2ljZQ==" title=\"Freedom Of Choice\" target=\"_blank\">Follow It</a></p>
<p>Oh, and the share buttons aren&#8217;t there for aesthetic value.</p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=814" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F05%2F13%2Fi-love-that-idea%2F&amp;linkname=I%20love%20that%20idea%21"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/05/13/i-love-that-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweet Tank in Away3D and Hype</title>
		<link>http://i-create.org/2010/05/10/tweet-tank-in-away3d-and-hype/</link>
		<comments>http://i-create.org/2010/05/10/tweet-tank-in-away3d-and-hype/#comments</comments>
		<pubDate>Tue, 11 May 2010 04:05:59 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[data visualization]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/05/10/tweet-tank-in-away3d-and-hype/</guid>
		<description><![CDATA[Alright so I know everyone associates Twitter with birds well all the bird models in the google 3d Warehouse suck. So I decided to make a fish tank because fish are cool. I used away3dlite, hype, and twitter to create this simple 3d / hype experiment. I will give you fare warning it is kind [...]]]></description>
			<content:encoded><![CDATA[<p>Alright so I know everyone associates Twitter with birds well all the bird models in the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NrZXRjaHVwLmdvb2dsZS5jb20vM2R3YXJlaG91c2Uv" title=\"3D warehouse\" target=\"_blank\">google 3d Warehouse</a> suck.  So I decided to make a fish tank because fish are cool.  I used <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20vYXdheTNkLWxpdGUtdjEtMC1mYXN0ZXN0LWFuZC1zbWFsbGVzdC0zZC1lbmdpbmUtaW4tZmxhc2g=" title=\"What is Away3dLite\" target=\"_blank\">away3dlite</a>, <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZy8=" title=\"Hype Framework\" target=\"_blank\">hype</a>, and twitter to create this simple 3d / hype experiment.  I will give you fare warning it is kind of processor intensive and I think if I re-export my models from prefab as a compile .awd this will alleviate some of the performance issues.  The memory management isn&#8217;t so bad but I would like to improve the FPS.  I will say this though in comparison to the html5 / webGL <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy8yMDEwLzA0LzI2L3dlYmdsLXR3ZWV0dGFuay1idWlsdC13aXRoLWMzZGwtcGFydC0yLw==" title=\"TweetTank WebGL\" target=\"_blank\">TweetTank</a> I believe this one performs better.  It also doesn&#8217;t heat up my Mac book like it is going to take off for space (I have noticed that in Firefox it does heat up when using webGL although it is a pre-alpha).  I was also able to add sound to this version and use away3dlite a really solid 3d library for flash.  This project was pretty easy didn&#8217;t take long to create and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL3ByZWZhYi8=" title=\"Prefab\" target=\"_blank\">PreFab</a> really speed up the process. </p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLw==" title=\"TweetTank\" target=\"_blank\">The Experiment:<br />
<img src="http://i-create.org/actionscript/TweetTank/TweetTankAS.jpg" title="Tweet Tank" /><br />
</a></p>
<p>PreFab is an Air application that allows Awary3d scene designers to easily import and export models for use with away3d.  It is also important to note that away3d has spent a significant amount of time to optimize 3d away3d support <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5kZXJzY2htYWxlLmNvbS8yMDEwLzA0LzIyL2JzcHB2cy1yZWxlYXNlZC1pbi1hd2F5LTMtNS0wLw==" title=\"Binary Space Partitioning\" target=\"_blank\">Binary Space Partitioning</a>.  Hopefully in future versions of PreFab we can import .bsp maps that would truly be the cats meow!   I was able to use PreFab to import my .dae files with ease and export them to actionscript with minor changes.  It is nice to create the models as actionscirpt class files you can easily make changes to the class file directly and it didn&#8217;t take long to get them into flash!</p>
<p>In the next version of this fish tank I will make it so you can search twitter and the fish will be populated with your results.  Right now if you click on a fish it will take you to a new window with a twitter search for &#8220;Flash&#8221;.  I will also look at ways to further incorporate Hype and animate the fish more smoothly.  I will also implement more camera support.  In the third version I would like to demonstrate google maps integration and use the map to zoom in on the specific fish.</p>
<p>For those of you interested learning more about <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL0Vzc2VudGlhbC1HdWlkZS0zRC1GbGFzaC9kcC8xNDMwMjI1NDE2" title=\"Away3D Flash Essential Guide\" target=\"_blank\">Away3d I suggest this Amazon book</a> I haven&#8217;t read it yet but I look forward to it I just received it today in the mail.  Away3d is easy to use and I also highly recommend looking at <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZy9ibG9nL2NvbnRlbnQvaHlwZS1nZXRzLWEtbmV3LWRvbWFpbi8=" title=\"Hype Framework\" target=\"_blank\">Hype</a> this is a really cool framework that really opens up lots of possibilities for your creative output!</p>
<p>The Source Code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TweetTank <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> twitterFish:tweetFish=<span style="color: #000000; font-weight: bold;">new</span> tweetFish;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> TweetTank<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
			addChild<span style="color: #66cc66;">&#40;</span>twitterFish<span style="color: #66cc66;">&#41;</span>;
			twitterFish.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			twitterFish.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">containers</span>.<span style="color: #006600;">ObjectContainer3D</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">materials</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">materials</span>.<span style="color: #006600;">WireColorMaterial</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Cube6</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">templates</span>.<span style="color: #006600;">BasicTemplate</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">core</span>.<span style="color: #006600;">base</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">core</span>.<span style="color: #006600;">utils</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> away3dlite.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> twFish.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> twTank.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> RSSJSONW;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">theflashblog</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Math2</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">XMLUtil</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">serialization</span>.<span style="color: #006600;">json</span>.<span style="color: #006600;">JSON</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">syndication</span>.<span style="color: #006600;">rss</span>.<span style="color: #006600;">Item20</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">syndication</span>.<span style="color: #006600;">rss</span>.<span style="color: #006600;">RSS20</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IOErrorEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">SecurityErrorEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">navigateToURL</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequestMethod</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #006600;">Security</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">KeyboardEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">ui</span>.<span style="color: #006600;">Keyboard</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Vector3D</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">BlendMode</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">GlowFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundChannel</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
&nbsp;
&nbsp;
	<span style="color: #0066CC;">import</span> gs.<span style="color: #006600;">TweenLite</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">FunctionTracker</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">layout</span>.<span style="color: #006600;">GridLayout</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #006600;">SoundAnalyzer</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapCanvas</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">rhythm</span>.<span style="color: #006600;">FilterCanvasRhythm</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">rhythm</span>.<span style="color: #006600;">FilterRhythm</span>;
&nbsp;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> tweetFish <span style="color: #0066CC;">extends</span> BasicTemplate <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> bitmapCanvas:BitmapCanvas;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> musicChannel;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> origin:Vector3D=<span style="color: #000000; font-weight: bold;">new</span> Vector3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">40</span>,<span style="color: #cc66cc;">900</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> twFishOne:TwFish1;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> bitmapCanvasBlur:BitmapCanvas;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> twTankC:TwTank1;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> soundAnalyzer:SoundAnalyzer;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">sound</span>:<span style="color: #0066CC;">Sound</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> myX:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;">0</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> layout:GridLayout;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> Tank:ObjectContainer3D;
		<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> myRSS:RSSJSONW;
		Security.<span style="color: #006600;">loadPolicyFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://twitter.com/crossdomain.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
		Security.<span style="color: #0066CC;">allowInsecureDomain</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span>;
		Security.<span style="color: #0066CC;">allowDomain</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> myTimer:Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> colourScheme:<span style="color: #0066CC;">Array</span>=<span style="color: #66cc66;">&#91;</span>0x18b849,0x1858b8,0x18b81c,0x18b89c,0xb818b2,0xfd02f4,0x3102fd,0x02b3fd,0x1afd02,0xf4fd02,0xfd02f4,0x3102fd,0x02b3fd,0x1afd02,0xf4fd02<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> tweetFish<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_WHEEL</span>, onMouseWheelEvent<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> filterA:<span style="color: #0066CC;">Array</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span>  ;
			filterA.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> GlowFilter<span style="color: #66cc66;">&#40;</span>0xFFFFFF, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">19</span>, <span style="color: #cc66cc;">19</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> blur:BlurFilter = <span style="color: #000000; font-weight: bold;">new</span> BlurFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			blur.<span style="color: #006600;">blurX</span>=<span style="color: #cc66cc;">900</span>;
			blur.<span style="color: #006600;">blurY</span>=<span style="color: #cc66cc;">900</span>;
			filterA.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>blur<span style="color: #66cc66;">&#41;</span>;
			playMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			soundAnalyzer = <span style="color: #000000; font-weight: bold;">new</span> SoundAnalyzer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			soundAnalyzer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			layout=<span style="color: #000000; font-weight: bold;">new</span> GridLayout<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">900</span>,-<span style="color: #cc66cc;">175</span>,<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span>;
			Tank = <span style="color: #000000; font-weight: bold;">new</span> ObjectContainer3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>Tank<span style="color: #66cc66;">&#41;</span>;
			Tank.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent3D.<span style="color: #006600;">MOUSE_MOVE</span>, goFish,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			twTankC=<span style="color: #000000; font-weight: bold;">new</span> TwTank1<span style="color: #66cc66;">&#40;</span>view<span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>twTankC<span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">mouseEnabled</span>=<span style="color: #000000; font-weight: bold;">true</span>;
			jsonInit<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://search.twitter.com/search.json?q=flash&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span>=-<span style="color: #cc66cc;">2000</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">1600</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">400</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">lookAt</span><span style="color: #66cc66;">&#40;</span> origin <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,_checkMouseEventTrail,<span style="color: #000000; font-weight: bold;">false</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, keyDown, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> jsonInit<span style="color: #66cc66;">&#40;</span>siteFeed:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
				myRSS = <span style="color: #000000; font-weight: bold;">new</span> RSSJSONW<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;;
				myRSS._data = <span style="color: #ff0000;">&quot;&quot;</span>;
				myRSS._txtURL = siteFeed;
				myRSS.<span style="color: #006600;">onJSON</span><span style="color: #66cc66;">&#40;</span>myRSS._txtURL<span style="color: #66cc66;">&#41;</span>;
				myTimer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				myTimer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;timer&quot;</span>, timedFunction<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> timedFunction<span style="color: #66cc66;">&#40;</span>eventArgs:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>myRSS._IsReady == <span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					myTimer.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;	
					addFish<span style="color: #66cc66;">&#40;</span>myRSS<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">//Really Helpful for tracing events!	</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> _checkMouseEventTrail<span style="color: #66cc66;">&#40;</span>$e:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> p:<span style="color: #66cc66;">*</span> =$e.<span style="color: #0066CC;">target</span>;
			<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&gt;&gt;&quot;</span>, p.<span style="color: #0066CC;">name</span>,<span style="color: #ff0000;">&quot;: &quot;</span>,p<span style="color: #66cc66;">&#41;</span>;
				p=p.<span style="color: #006600;">parent</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addFish<span style="color: #66cc66;">&#40;</span>myRSS:RSSJSONW<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i<span style="color: #66cc66;">&lt;</span>myRSS._twdata.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>view<span style="color: #66cc66;">&#41;</span>;
				twFishOne=<span style="color: #000000; font-weight: bold;">new</span> TwFish1<span style="color: #66cc66;">&#40;</span>view<span style="color: #66cc66;">&#41;</span>;
&nbsp;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">!</span>=<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					twFishOne.<span style="color: #006600;">x</span>=i<span style="color: #66cc66;">*</span>randRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">400</span><span style="color: #66cc66;">&#41;</span>;
					twFishOne.<span style="color: #006600;">y</span>=i<span style="color: #66cc66;">*</span>randRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">400</span><span style="color: #66cc66;">&#41;</span>;
					twFishOne.<span style="color: #006600;">z</span>=i<span style="color: #66cc66;">*</span>randRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">400</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
				<span style="color: #000000; font-weight: bold;">var</span> baseFrequency:uint = <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">90</span> <span style="color: #66cc66;">%</span> <span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>;
				<span style="color: #000000; font-weight: bold;">var</span> xMove:FunctionTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scale&quot;</span>,dancingFish,<span style="color: #66cc66;">&#91;</span>i,twFishOne<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
				xMove.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>twFishOne.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> fishy:Object3D=twFishOne;
				<span style="color: #808080; font-style: italic;">//twFishOne.clipContainer.addChild(twFishOne);</span>
				<span style="color: #808080; font-style: italic;">//twFishOne.addChild(twFishOne);</span>
				view.<span style="color: #006600;">scene</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>twFishOne<span style="color: #66cc66;">&#41;</span>;
&nbsp;
				twFishOne.<span style="color: #0066CC;">name</span>=i.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				<span style="color: #808080; font-style: italic;">//fishy.layer.blendMode = BlendMode.ADD;</span>
				fishy.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent3D.<span style="color: #006600;">MOUSE_DOWN</span>, goFish,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> playMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">sound</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Sound</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;test.mp3&quot;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
			musicChannel=<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">int</span>.<span style="color: #0066CC;">MAX_VALUE</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">try</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
			<span style="color: #66cc66;">&#125;</span><span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				musicChannel.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SOUND_COMPLETE</span>, loopMusic<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			musicChannel.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SOUND_COMPLETE</span>, loopMusic<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> loopMusic<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>musicChannel<span style="color: #66cc66;">!</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
				playMusic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> goFish<span style="color: #66cc66;">&#40;</span>event:MouseEvent3D<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>myRSS._twdata<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">currentTarget</span>.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;		
			<span style="color: #000000; font-weight: bold;">var</span> myURL:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>myRSS._twdata<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">currentTarget</span>.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			navigateToURL<span style="color: #66cc66;">&#40;</span>myURL<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onMouseWheelEvent<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">delta</span><span style="color: #66cc66;">&#41;</span>;
			TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #66cc66;">&#123;</span>z: event.<span style="color: #006600;">delta</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">500</span> + <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span>,<span style="color: #0066CC;">onUpdate</span>: onCameraMove<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> keyDown<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:KeyboardEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">keyCode</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">32</span> :
					moveCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
					<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> randRange<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">min</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">max</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// Generate a number between and including min - max</span>
			<span style="color: #000000; font-weight: bold;">var</span> randomNum:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">floor</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>max-<span style="color: #0066CC;">min</span>+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0066CC;">min</span>;
			<span style="color: #b1b100;">return</span> randomNum;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> dancingFish<span style="color: #66cc66;">&#40;</span>i:uint, twFishOne:TwFish1<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> baseFrequency:uint = <span style="color: #66cc66;">&#40;</span>i <span style="color: #66cc66;">%</span> <span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>;
			<span style="color: #808080; font-style: italic;">//trace(baseFrequency + &quot;-Beat&quot;);</span>
			<span style="color: #000000; font-weight: bold;">var</span> xScaleTracker:FunctionTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scaleX&quot;</span>,soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>,<span style="color: #66cc66;">&#91;</span>baseFrequency,baseFrequency+<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> yScaleTracker:FunctionTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scaleY&quot;</span>,soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>,<span style="color: #66cc66;">&#91;</span>baseFrequency,baseFrequency+<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> zScaleTracker:FunctionTracker=<span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>twFishOne,<span style="color: #ff0000;">&quot;scaleZ&quot;</span>,soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>,<span style="color: #66cc66;">&#91;</span>baseFrequency,baseFrequency+<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span>twFishOne, <span style="color: #cc66cc;">5</span>, <span style="color: #66cc66;">&#123;</span>x:twFishOne.<span style="color: #006600;">x</span> + <span style="color: #cc66cc;">50</span>, y:twFishOne.<span style="color: #006600;">y</span> + <span style="color: #cc66cc;">50</span>, z:twFishOne.<span style="color: #006600;">z</span> + <span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			xScaleTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			yScaleTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			zScaleTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> moveCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;In Move Camera&quot;</span><span style="color: #66cc66;">&#41;</span>;
			TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span>
			                    <span style="color: #0066CC;">camera</span>, 
			                    <span style="color: #cc66cc;">4</span>, 
			                    <span style="color: #66cc66;">&#123;</span>
			                        x: Math2.<span style="color: #006600;">rand</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">9000</span>, <span style="color: #cc66cc;">9000</span><span style="color: #66cc66;">&#41;</span>,
			                        y: Math2.<span style="color: #006600;">rand</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">9000</span>, <span style="color: #cc66cc;">9000</span><span style="color: #66cc66;">&#41;</span>,
			                        z: <span style="color: #cc66cc;">1400</span> + Math2.<span style="color: #006600;">rand</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">9800</span>, <span style="color: #cc66cc;">9000</span><span style="color: #66cc66;">&#41;</span>,
			                        delay: <span style="color: #cc66cc;">2</span>,
			                        <span style="color: #0066CC;">onUpdate</span>: onCameraMove
			                    <span style="color: #66cc66;">&#125;</span>
			                <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCameraMove<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">lookAt</span><span style="color: #66cc66;">&#40;</span> origin <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		override protected <span style="color: #000000; font-weight: bold;">function</span> onPreRender<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			Tank.<span style="color: #006600;">rotationY</span>++;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLnppcA==" title=\"TweetTank\">Download Code</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLw==" title=\"TweetTank Away3D with Hype on Flash\" target=\"_blank\">Launch Experiment</a></p>
<p>Cool Links:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZw==" title=\"Hype\" target=\"_blank\">Hype</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZy9ibG9nLw==" title=\"Hype Blog\" target=\"_blank\">Hype Blog</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL3ByZWZhYi8=" title=\"PreFab\" target=\"_blank\">Prefab</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL2Jsb2cv" title=\"Prefab\" target=\"_blank\">Prefab &#8211; blog</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy53ZW1ha2Vkb3Rjb21zLmNvbS9ibG9nLzIwMTAvMDIvMTkvaS1saWtlLWh5cGUv" title=\"Hype Away3D\" target=\"_blank\">Relly Cool Hype Away3d Example</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20v" title=\"Away3D\" target=\"_blank\">Away3D</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hemFyYXNrLmluL2Jsb2cvcG9zdC9jb250ZXh0ZnJlZWpzLWFsZ29yaXRobS1pbmstbWFraW5nLWFydC13aXRoLWphdmFzY3JpcHQvP3V0bV9zb3VyY2U9dHdpdHRlcmZlZWQmYW1wO3V0bV9tZWRpdW09dHdpdHRlcg==" title=\"Context Free Art\" target=\"_blank\">Context Free Art with JavaScript</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=812" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F05%2F10%2Ftweet-tank-in-away3d-and-hype%2F&amp;linkname=Tweet%20Tank%20in%20Away3D%20and%20Hype"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/05/10/tweet-tank-in-away3d-and-hype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Away3D with Hype Fish Tank</title>
		<link>http://i-create.org/2010/05/03/away3d-with-hype-fish-tank/</link>
		<comments>http://i-create.org/2010/05/03/away3d-with-hype-fish-tank/#comments</comments>
		<pubDate>Mon, 03 May 2010 05:29:15 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[PreFab]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/05/03/away3d-with-hype-fish-tank/</guid>
		<description><![CDATA[Well for awhile I was experimenting with C3DL which I like and will continue to play with in my spare time (Becuase it needs lots of refinement it is really rough). This is a flash rendering of the same experiment I will break this into several tutorials in the next couple weeks and post the [...]]]></description>
			<content:encoded><![CDATA[<p>Well for awhile I was experimenting with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy8=" title=\"C3DL WebGL library\" target=\"_blank\">C3DL</a> which I like and will continue to play with in my spare time (Becuase it needs lots of refinement it is really rough). This is a flash rendering of the same experiment I will break this into several tutorials in the next couple weeks and post the code.  In short I used <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL3ByZWZhYi8=" title=\"PreFab\" target=\"_blank\">PreFab</a> to manage my models and I am really pleased with how easy it was to use!  I have also decided to add sound to the experiment.  I am also using the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZy8=" title=\"HypeFramework Generative Art ToolKit\" target=\"_blank\">hype framework</a>.  I would like to make the fish in the Tank have a swarming effect.  The swarming effect utilizes a point.  I would like to look at modifying this so it could also except a vector.  I will look at diving into this in the future.  RIght now if you click on them they will not go to a twitter result this functionality and twitter search will be built into it at a later date probably next weekend.  If you click on the spacebar the camera will zoom randomly if you spin the mouse wheel you will pivot around the center points.  I will add more control in the near future.  I really like the amount of control I have with the combination of Hype and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20v" title=\"Away3D\" target=\"_blank\">Away3D</a> this experiment was fun to put together.  I am looking forward to refining it.  The fish also currently dance to the music (Only if sound is not currently running in another tab like Youtube) I will work on smoothing these features out. I did get into a gotcha with mouse events in away3d and it was caused by a blur feature I added to a bitmap canvas it took me awhile to track down the issue and I found this helpful chunk of code on my quest to debug it.  <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdzcGFjZXNoaXAuY29tL2Jsb2cvbGFicy9zbmFyaW5nLW1vdXNlZW5hYmxlZC8=" title=\"Tracking Down ActionScript Events\" target=\"_blank\">Check it out</a> this is a life saver for tracking events down in ActionScript.</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLw==" target=\"_blank\" title=\"Away3D / Hype Experiment\">Click Here</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvVHdlZXRUYW5rLw==" target=\"_blank\" title=\"Away3D / Hype Experiment\"><img src="http://i-create.org/actionscript/TweetTank/TweetTank.jpg" title="Dancing Fish With Away3D and Hype" /></a></p>
<p>I enjoyed working with prefab it is an excellent tool that will greatly speed up your away3d work-flow.  The guys that built away3d have a<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL0Vzc2VudGlhbC1HdWlkZS0zRC1GbGFzaC9kcC8xNDMwMjI1NDE2L3JlZj1zcl8xX2ZrbXIwXzE/aWU9VVRGOCZhbXA7cWlkPTEyNzI4NjM3NDYmYW1wO3NyPTgtMS1ma21yMA==" title=\"Away3D Flash 3D Essentials\" target=\"_blank\"> book coming out</a> from Friends of Ed.  I personally can&#8217;t wait to receive it in the mail.  I also hope to see a HypeFramework book in the near future as well.  It is definetly an exciting time to be a flash developer.  I am really looking forward to flash being on Android.  It will be fun to use the HypeFramework with the accelerometer etc..</p>
<p>I have been busy working.  I have really been studying HTML5 and I am really excited about it.  I think WebGL is really cool although I also think the browsers should open up sound streams in the browser so they can be interpreted.  Currently Flash can interpret sound but you can&#8217;t make a mashUp with youtube and interpret sound from that location because that would not be inline with the Flash Security model. I have also been keeping my eye on javascript frameworks that are geared toward mobile.  I recommend looking at jQTouch and Sprout Core they have lots of potential.  CSS3 is definitely the holy grail of CSS.  The CSS transforms that are allowed on Webkit are awesome.  Hopefully all the other browsers will follow suit (I won&#8217;t hold my breath for Internet Exploder).  I am looking forward to putting together more content that is just geared at mobile devices.  I also have been playing around with the iPhone SDK I got Wolfenstein to run on my iPhone emulator this week:)</p>
<p>Flash Links:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZy8=" title=\"HypeFramework Generative Art ToolKit\" target=\"_blank\">Hype Framework</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20v" title=\"Away3D\" target=\"_blank\">Away3D</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL3ByZWZhYi8=" title=\"PreFab\" target=\"_blank\">PreFab</a></p>
<p>WebGL Links:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xlYXJuaW5nd2ViZ2wuY29tL2Jsb2cv" title=\"Learning WebGL\" target=\"_blank\">Learning WebGL</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy8=" title=\"C3DL WebGL\" target=\"_blank\">C3DL</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuZXJnaXplLmNjLw==" title=\"Energize WebGL\" target=\"_blank\">Energize</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5nbGdlLm9yZy8=" title=\"GLGE WebGL\" target=\"_blank\">GlGE</a></p>
<p>JavaScript:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5qcXRvdWNoLmNvbS8=" title=\"jQTouch\" target=\"_blank\">jQTouch</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zcHJvdXRjb3JlLmNvbS8=" title=\"Sprout Core\" target=\"_blank\">Sprout Core</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NjcmlwdHkyLmNvbS8=" title=\"Scripty\" target=\"_blank\">Scripty</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcv" title=\"ProcessingJS\" target=\"_blank\">ProcessingJS</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=810" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F05%2F03%2Faway3d-with-hype-fish-tank%2F&amp;linkname=Away3D%20with%20Hype%20Fish%20Tank"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/05/03/away3d-with-hype-fish-tank/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebGL TweetTank Built with C3DL Part 2</title>
		<link>http://i-create.org/2010/04/26/webgl-tweettank-built-with-c3dl-part-2/</link>
		<comments>http://i-create.org/2010/04/26/webgl-tweettank-built-with-c3dl-part-2/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 04:27:42 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MashUp]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[C3DL]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[webGL]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/26/webgl-tweettank-built-with-c3dl-part-2/</guid>
		<description><![CDATA[I have added the ability to search twitter and re-populate the fish tank. So now you can place a search in like &#8220;Tool&#8221; or &#8220;Toledo&#8221; or whatever you query it will pull results from twitter. I have noticed this experiment is resource intensive. In part three of this experiment I will look for ways to [...]]]></description>
			<content:encoded><![CDATA[<p>I have added the ability to search twitter and re-populate the fish tank.  So now you can place a search in like &#8220;Tool&#8221; or &#8220;Toledo&#8221; or whatever you query it will pull results from twitter.  I have noticed this experiment is resource intensive.  In part three of this experiment I will look for ways to tidy up the code make it more reusable and less resource intensive.  I also noticed in <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy8=" title=\"C3Dl\" target=\"_blank\">c3dl</a> they already have a nice <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy93cC1jb250ZW50L2RvY3VtZW50YXRpb24vMi4wX3VzZXJfZG9jcy9zeW1ib2xzL2MzZGwuaHRtbCMuZ2V0UmFuZG9t" title=\"Random Function\" target=\"_blank\">random number</a> function built in I will have to try and use that in the future.  I am also curious to see if I can&#8217;t use this library to augment the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcv" title=\"ProcessingJS\" target=\"_blank\">Processing.JS</a> library I noticed the same group at <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcvYmxvZy8/Y2F0PTE=" title=\"Students at Seneca Working on ProcessingJS\" target=\"_blank\">Secena</a> is also working on this library I believe they have ported most of the new functions.  I also added two sliders with jQuery to control the camera I am currently using an orbitCamera I think I will change this in the future to utilize a free camera and use the animateAxis function to animate around a vector with an angle.  Currently I am using the Yaw and Pitch functions of the orbitCamera of course it looks kind of awkward to spin it.  I will try to find ways to speed this experiment up, fix the picking result to be more sensitive, clean up the look and feel of it for part three.   If there is a part four it will be about making the fish bound to the sphere and maybe making them so the swim back and forth not in a straight line.</p>
<p>I might also be making a similar experiment with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20vYXdheTNkLWxpdGUtdjEtMC1mYXN0ZXN0LWFuZC1zbWFsbGVzdC0zZC1lbmdpbmUtaW4tZmxhc2g=" title=\"Away3D Lite\" target=\"_blank\">away3Dlite</a> and the hype framework with flash this weekend.  This has been a fun experiment to play around with.  Maybe Adobe should allocate some of their resources to compiling to javascript and using the webGL and DirectX for IE with the canvas tag (Even though It isn&#8217;t as fast as flash and doensn&#8217;t display the same across browsers).  Haxe I believe currently does this to some extent I am not sure how fast the results are but seems to me their are <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jaHJvbWVleHBlcmltZW50cy5jb20vZGV0YWlsLzNkLWphdmFzY3JpcHQtd2l0aC1zYW5keS1oeC8=" title=\"sandy3D with haXe on Chrome Experiments\" target=\"_blank\">Sandy3D experiments on Google Experiments</a>.</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3R3aXR0ZXJTZWEvVHdlZXRUYW5rLmh0bWw=" title=\"TweetTank WebGL example Created with C3DL\" target=\"_blank\"><img src="http://i-create.org/JavaScript/twitterSea/tweetTank.jpg" alt="TweetTank WebGL example Created with C3DL" /></a></p>
<p>Here is the code for the experiment:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> CANVAS_WIDTH <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> CANVAS_HEIGHT <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span>CANVAS_WIDTH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span>CANVAS_HEIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> arrayTwit<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> schooloffish<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> fishArray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> bubblesArray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> bubbles<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> objectsHit <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> objectSelected<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> cam<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> searchInt <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">function</span> mRandom<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> randomInt <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> r <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">return</span> randomInt<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        c3dl.<span style="color: #660066;">addModel</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fish.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        c3dl.<span style="color: #660066;">addModel</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;OceanSphere.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #006600; font-style: italic;">// The program main</span>
        <span style="color: #003366; font-weight: bold;">function</span> canvasMain<span style="color: #009900;">&#40;</span>canvasName<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Create new c3dl.Scene object</span>
            scn <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Scene</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            scn.<span style="color: #660066;">setCanvasTag</span><span style="color: #009900;">&#40;</span>canvasName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Create GL context</span>
            renderer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">WebGL</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            renderer.<span style="color: #660066;">addTexture</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;bubble.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            renderer.<span style="color: #660066;">createRenderer</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Attach renderer to the scene</span>
            scn.<span style="color: #660066;">setRenderer</span><span style="color: #009900;">&#40;</span>renderer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            scn.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span>canvasName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #006600; font-style: italic;">//the isReady() function tests whether or not a renderer</span>
            <span style="color: #006600; font-style: italic;">//is attached to a scene.  If the renderer failed to</span>
            <span style="color: #006600; font-style: italic;">//initialize this will return false but only after you</span>
            <span style="color: #006600; font-style: italic;">//try to attach it to a scene.</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>renderer.<span style="color: #660066;">isReady</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #006600; font-style: italic;">// Create a Collado object that</span>
                <span style="color: #006600; font-style: italic;">// will contain a imported</span>
                <span style="color: #006600; font-style: italic;">// model of something to put</span>
                <span style="color: #006600; font-style: italic;">// in the scene.</span>
                <span style="color: #003366; font-weight: bold;">var</span> schooloffish <span style="color: #339933;">=</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> ocean <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Collada</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;OceanSphere.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">setAngularVel</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> .00005<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">scale</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">20.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20.0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">setPickable</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                scn.<span style="color: #660066;">addObjectToScene</span><span style="color: #009900;">&#40;</span>ocean<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
				<span style="color: #006600; font-style: italic;">//console.log(arrayTwit.length);</span>
                <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> arrayTwit.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #006600; font-style: italic;">//console.log(arrayTwit[i]);</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Collada</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fish.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">yaw</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">45.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">ID</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Fish&quot;</span> <span style="color: #339933;">+</span> i<span style="color: #339933;">;</span>
                    <span style="color: #006600; font-style: italic;">//fish.roll(25.0);</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">pitch</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">86.4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setLinearVel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://twitter.com/&quot;</span> <span style="color: #339933;">+</span> arrayTwit<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">from_user</span><span style="color: #339933;">;</span>
                    <span style="color: #006600; font-style: italic;">//fish.setPosition([1200, 100, 700]);</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">900</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1500</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    scn.<span style="color: #660066;">addObjectToScene</span><span style="color: #009900;">&#40;</span>fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">7</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">ParticleSystem</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinVelocity</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxVelocity</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinLifetime</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5.3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxLifetime</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10.7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinColor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0.3</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxColor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0.3</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0.5</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setSrcBlend</span><span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">ONE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setDstBlend</span><span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">ONE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinSize</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxSize</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setTexture</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;bubble.gif&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setAcceleration</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">9</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setEmitRate</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">40</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">150</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">700</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    scn.<span style="color: #660066;">addObjectToScene</span><span style="color: #009900;">&#40;</span>bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #006600; font-style: italic;">// Create a camera</span>
                <span style="color: #006600; font-style: italic;">//var cam = new c3dl.FreeCamera();</span>
&nbsp;
&nbsp;
&nbsp;
               <span style="color: #006600; font-style: italic;">// scn.setCamera(cam);</span>
                cam <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">OrbitCamera</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                cam.<span style="color: #660066;">setFarthestDistance</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//cam.pitch(90);</span>
                cam.<span style="color: #660066;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3000.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200.0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//cam.setLookAtPoint(new Array(0.0, 0.0, 0.0));</span>
                cam.<span style="color: #660066;">setOrbitPoint</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">800.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200.0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                cam.<span style="color: #660066;">setClosestDistance</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                cam.<span style="color: #660066;">setDistance</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">900</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//cam.pitch(1);</span>
                scn.<span style="color: #660066;">setCamera</span><span style="color: #009900;">&#40;</span>cam<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">// Start the scene</span>
                scn.<span style="color: #660066;">startScene</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                scn.<span style="color: #660066;">setPickingCallback</span><span style="color: #009900;">&#40;</span>goLink<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//scn.setKeyboardCallback(onKeyUp, onKeyDown);</span>
                scn.<span style="color: #660066;">setMouseCallback</span><span style="color: #009900;">&#40;</span>mouseWheel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">function</span> goLink<span style="color: #009900;">&#40;</span>pickingObj<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
 			<span style="color: #003366; font-weight: bold;">var</span> objectsHit <span style="color: #339933;">=</span> pickingObj.<span style="color: #660066;">getObjects</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> objectsHit.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span>
			 <span style="color: #009900;">&#123;</span>
 				<span style="color: #003366; font-weight: bold;">var</span> sepiaEffect <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Effect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				sepiaEffect.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">effects</span>.<span style="color: #660066;">SEPIA</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 				window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>objectsHit<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'_blank'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				objectsHit<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setEffect</span><span style="color: #009900;">&#40;</span>sepiaEffect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 					<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> arrayTwit.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>objectsHit<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span> <span style="color: #339933;">==</span> scn.<span style="color: #660066;">getObj</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">url</span><span style="color: #009900;">&#41;</span>
 					scn.<span style="color: #660066;">getObject</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setEffect</span><span style="color: #009900;">&#40;</span>sepiaEffect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 					<span style="color: #009900;">&#125;</span>
 				<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">function</span> mouseWheel<span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> delta <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">const</span> ZOOM_SENSITIVITY <span style="color: #339933;">=</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">;</span>
            <span style="color: #006600; font-style: italic;">// Chromium</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">wheelDelta</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                delta <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>event.<span style="color: #660066;">wheelDelta</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #006600; font-style: italic;">// Minefield</span>
            <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">detail</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                delta <span style="color: #339933;">=</span> event.<span style="color: #660066;">detail</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>keyD<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    cam.<span style="color: #660066;">yaw</span><span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY <span style="color: #339933;">/</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// towards user</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        cam.<span style="color: #660066;">goFarther</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">*</span> <span style="color: #339933;">-</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// towards screen</span>
                    <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        cam.<span style="color: #660066;">goCloser</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> twitterSearch<span style="color: #009900;">&#40;</span>searchTag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">//console.log(searchTag);</span>
	arrayTwit <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
	arrayTwit <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                $.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://search.twitter.com/search.json?q=&quot;</span> <span style="color: #339933;">+</span> searchTag <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;callback=?&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data.<span style="color: #660066;">results</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                twitSeach <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">;</span>
                arrayTwit.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>twitSeach<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>searchInt <span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				searchInt<span style="color: #339933;">++;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#TweetTankBowl'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#TweetTankBowl'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;canvas style=&quot;display: block;&quot; id=&quot;tweetTank&quot; width=&quot;800&quot; height=&quot;800&quot;&gt;&lt;/canvas&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span>CANVAS_WIDTH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span>CANVAS_HEIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				canvasMain<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;tweetTank&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
				searchInt<span style="color: #339933;">++;</span>	
				c3dl.<span style="color: #660066;">addMainCallBack</span><span style="color: #009900;">&#40;</span>canvasMain<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;tweetTank&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            twitterSearch<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fishing&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			sliderGo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> goTwitter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> tweet <span style="color: #339933;">=</span>  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetSearchTxt'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
twitterSearch<span style="color: #009900;">&#40;</span>tweet<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> sliderGo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#sliderVeritcal&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slider</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
				step<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.15</span><span style="color: #339933;">,</span>
				min<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.00</span><span style="color: #339933;">,</span>
				max<span style="color: #339933;">:</span><span style="color: #CC0000;">360.00</span><span style="color: #339933;">,</span>
				orientation<span style="color: #339933;">:</span> <span style="color: #3366CC;">'vertical'</span><span style="color: #339933;">,</span>
				slide<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #339933;">,</span> ui<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
					cam.<span style="color: #660066;">pitch</span><span style="color: #009900;">&#40;</span>ui.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#sliderHorizontal&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slider</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
				step<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.15</span><span style="color: #339933;">,</span>
				min<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.00</span><span style="color: #339933;">,</span>
				max<span style="color: #339933;">:</span><span style="color: #CC0000;">360.00</span><span style="color: #339933;">,</span>
				slide<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #339933;">,</span> ui<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
					cam.<span style="color: #660066;">yaw</span><span style="color: #009900;">&#40;</span>ui.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3R3aXR0ZXJTZWEvVHdlZXRUYW5rLmh0bWw=" title=\"TweetTank WebGL example Created with C3DL\" target=\"_blank\">Launch Experiment</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3R3aXR0ZXJTZWEuemlw" title=\"TweetTank WebGL example Created with C3DL Download\" target=\"_blank\">Download Code</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=809" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F26%2Fwebgl-tweettank-built-with-c3dl-part-2%2F&amp;linkname=WebGL%20TweetTank%20Built%20with%20C3DL%20Part%202"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/26/webgl-tweettank-built-with-c3dl-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebGL TweetTank Built with C3DL Part 1</title>
		<link>http://i-create.org/2010/04/18/webgl-tweettank-built-with-c3dl-part-1/</link>
		<comments>http://i-create.org/2010/04/18/webgl-tweettank-built-with-c3dl-part-1/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 01:04:01 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[C3DL]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[MashUp]]></category>
		<category><![CDATA[webGL]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/18/webgl-tweettank-built-with-c3dl-part-1/</guid>
		<description><![CDATA[First of all let me mention you will not be able to run this demo unless your browser is WebGL ready. So that means if you want to see this then you have to download a nightly build of FireFox, Chrome, or Safari. You can read how to do this here. My first impressions of [...]]]></description>
			<content:encoded><![CDATA[<p>First of all let me mention you will not be able to run this demo unless your browser is WebGL ready.  So that means if you want to see this then you have to download a nightly build of FireFox, Chrome, or Safari.  You can read how to do this <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy9pbmRleC5waHAvdHV0b3JpYWxzL3R1dG9yaWFsLTEtYnJvd3NlcnMv" title=\"Get WebGL Ready Browser!\" target=\"_blank\">here</a>. </p>
<p>My first impressions of WebGL is it is awesome and easy to do.  I believe WebGL will make it easy for any developer to rapidly create a game on the web.  It is fast appears to have decent support meaning that it works awesome on my Apple computers and on one of my Windows7 computers but then fails for me on one of my workstations that has a souped up ATI graphics card humm.. go figure.  It is hard to say how well the graphics rendering will perform on the majority of computers out their but it probably won&#8217;t be that bad and after all these are nightly builds that are pre-alpha for the most part.  It also makes me wonder if the next iPhones will have this feature built into their webkit.  Hard to say.  It is known that out of all the new browsers coming out that ie9 will not support graphics rendering shocking (Not really).  It might be because Microsoft believes that WebGL will be an epic failure or maybe they simply don&#8217;t have the resources to devote to it at this time. </p>
<p>I believe graphic card support in these new browsers will speed up canvas rendering a little but I when looking at the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2cuaTJmbHkuY29tLz9wPTEwODA=" title=\"Flash vs. HTML5\" target=\"_blank\">flash benchmarks</a> that are currently out their it definitely shows you how fast the flash player is in comparison.  In short canvas tag is not even remotely as fast. In the news their has been lots of discussion about flash being dead but this simply isn&#8217;t true.  Here is why forthcoming <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy53aXJlZC5jb20vZXBpY2VudGVyLzIwMTAvMDQvYXMtYXBwbGUtYmFycmljYWRlcy1mbGFzaC1oZHR2LWVtYnJhY2VzLWl0Lw==" title=\"Flash on your TV!\" target=\"_blank\">HDTV/3DTV</a> will support flash, google phones will support flash, blackberry, and windows phones will all support flash.  So as a mobile platform it will be the easiest way to build and deploy to all platforms.  It is too bad Apple doesn&#8217;t see it but oh well.  I guess I will just have to get better at Objective-C to be on that platform.</p>
<p>This is the first part of a two part example.  I created a simple mashup.  To create this example I used <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZw==" title=\"What is C3DL?\" target=\"_blank\">C3DL</a> and jQuery.  C3DL is an awesome opensouce library put together by the wonderful people at <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zZW5lY2FjLm9uLmNhLw==" title=\"Seneca College\" target=\"_blank\">Seneca College</a>.  This example pulls a search results from twitter with the search query subject being fishing.  Yes, I know that twitter is all about birds and tweets but after scouring the Google 3D warehouse, I decided that most of the models for birds that are freely available suck.  So I made a virtual fish tank instead.  The tank has bubbles rendered with the C3DL particle library and it also has a school of fish that swim slowly though the tank.  It&#8217;s not really ground shaking stuff pretty simple.  I will work on a future version where it pulls results with ajax.  I noticed the C3DL library attaches an event listener in the init.js that listens for the document to be loaded <img src='http://i-create.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  .  This of course makes my search function of twitter fail.  I have looked at overriding this feature a number of ways not limited to jQuery getScript, etc.. I could also put the query on the query string for the window location and then re-load the page but I think that would be kind of wonky so whatever I will do this in the next version of the experiment.  So whatever I will save it for next time.</p>
<p>Check out the experiment here but before you do <strong><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL25pZ2h0bHkubW96aWxsYS5vcmcv" title=\"MineField Firefox Nightly Build\" target=\"_blank\">download a nightly build of Firefox</a></strong>.</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3R3aXR0ZXJTZWEvVHdlZXRUYW5rLmh0bWw=" title=\"TweetTank WebGL example Created with C3DL\" target=\"_blank\"><img src="http://i-create.org/JavaScript/twitterSea/tweetTank.jpg" alt="TweetTank WebGL example Created with C3DL" /></a></p>
<p>Here is the code for the experiment:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> CANVAS_WIDTH <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> CANVAS_HEIGHT <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span>CANVAS_WIDTH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span>CANVAS_HEIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tweetTank'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> arrayTwit<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> schooloffish<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> fishArray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> bubblesArray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> bubbles<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> objectsHit <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> objectSelected<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">function</span> mRandom<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> randomInt <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> r <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">return</span> randomInt<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        c3dl.<span style="color: #660066;">addModel</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fish.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        c3dl.<span style="color: #660066;">addModel</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;OceanSphere.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #006600; font-style: italic;">// The program main</span>
        <span style="color: #003366; font-weight: bold;">function</span> canvasMain<span style="color: #009900;">&#40;</span>canvasName<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Create new c3dl.Scene object</span>
            scn <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Scene</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            scn.<span style="color: #660066;">setCanvasTag</span><span style="color: #009900;">&#40;</span>canvasName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Create GL context</span>
            renderer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">WebGL</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            renderer.<span style="color: #660066;">addTexture</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;bubble.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            renderer.<span style="color: #660066;">createRenderer</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Attach renderer to the scene</span>
            scn.<span style="color: #660066;">setRenderer</span><span style="color: #009900;">&#40;</span>renderer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            scn.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span>canvasName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">//the isReady() function tests whether or not a renderer</span>
            <span style="color: #006600; font-style: italic;">//is attached to a scene.  If the renderer failed to</span>
            <span style="color: #006600; font-style: italic;">//initialize this will return false but only after you</span>
            <span style="color: #006600; font-style: italic;">//try to attach it to a scene.</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>renderer.<span style="color: #660066;">isReady</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #006600; font-style: italic;">// Create a Collado object that</span>
                <span style="color: #006600; font-style: italic;">// will contain a imported</span>
                <span style="color: #006600; font-style: italic;">// model of something to put</span>
                <span style="color: #006600; font-style: italic;">// in the scene.</span>
&nbsp;
                <span style="color: #006600; font-style: italic;">//fish.setAngularVel(new Array(0.0, 0.0001, 0.0));</span>
&nbsp;
                <span style="color: #003366; font-weight: bold;">var</span> schooloffish <span style="color: #339933;">=</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> ocean <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Collada</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;OceanSphere.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">setAngularVel</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> .00005<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">scale</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">20.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20.0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                ocean.<span style="color: #660066;">setPickable</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                scn.<span style="color: #660066;">addObjectToScene</span><span style="color: #009900;">&#40;</span>ocean<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
				<span style="color: #006600; font-style: italic;">//console.log(arrayTwit.length);</span>
                <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> arrayTwit.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #006600; font-style: italic;">//console.log(arrayTwit[i]);</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Collada</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fish.dae&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">yaw</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">45.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">ID</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Fish&quot;</span> <span style="color: #339933;">+</span> i<span style="color: #339933;">;</span>
                    <span style="color: #006600; font-style: italic;">//fish.roll(25.0);</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">pitch</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">86.4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setLinearVel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://twitter.com/&quot;</span> <span style="color: #339933;">+</span> arrayTwit<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">from_user</span><span style="color: #339933;">;</span>
                    <span style="color: #006600; font-style: italic;">//fish.setPosition([1200, 100, 700]);</span>
                    fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">900</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1500</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    scn.<span style="color: #660066;">addObjectToScene</span><span style="color: #009900;">&#40;</span>fishArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">7</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">ParticleSystem</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinVelocity</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxVelocity</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinLifetime</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5.3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxLifetime</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10.7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinColor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0.3</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxColor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0.3</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0.5</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setSrcBlend</span><span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">ONE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setDstBlend</span><span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">ONE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMinSize</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setMaxSize</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setTexture</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;bubble.gif&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setAcceleration</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">9</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setEmitRate</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">40</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">150</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> mRandom<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">700</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    scn.<span style="color: #660066;">addObjectToScene</span><span style="color: #009900;">&#40;</span>bubblesArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #006600; font-style: italic;">// Create a camera</span>
                <span style="color: #006600; font-style: italic;">//var cam = new c3dl.FreeCamera();</span>
&nbsp;
&nbsp;
&nbsp;
               <span style="color: #006600; font-style: italic;">// scn.setCamera(cam);</span>
                cam <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">OrbitCamera</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                cam.<span style="color: #660066;">setFarthestDistance</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//cam.pitch(90);</span>
                cam.<span style="color: #660066;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3000.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200.0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//cam.setLookAtPoint(new Array(0.0, 0.0, 0.0));</span>
                cam.<span style="color: #660066;">setOrbitPoint</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">800.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100.0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200.0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                cam.<span style="color: #660066;">setClosestDistance</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                cam.<span style="color: #660066;">setDistance</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">900</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">//cam.pitch(1);</span>
                scn.<span style="color: #660066;">setCamera</span><span style="color: #009900;">&#40;</span>cam<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #006600; font-style: italic;">// Start the scene</span>
                scn.<span style="color: #660066;">startScene</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                scn.<span style="color: #660066;">setPickingCallback</span><span style="color: #009900;">&#40;</span>goLink<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                scn.<span style="color: #660066;">setKeyboardCallback</span><span style="color: #009900;">&#40;</span>onKeyUp<span style="color: #339933;">,</span> onKeyDown<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                scn.<span style="color: #660066;">setMouseCallback</span><span style="color: #009900;">&#40;</span>mouseMove<span style="color: #339933;">,</span> mouseWheel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">function</span> goLink<span style="color: #009900;">&#40;</span>pickingObj<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
 			<span style="color: #003366; font-weight: bold;">var</span> objectsHit <span style="color: #339933;">=</span> pickingObj.<span style="color: #660066;">getObjects</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> objectsHit.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span>
			 <span style="color: #009900;">&#123;</span>
 				<span style="color: #003366; font-weight: bold;">var</span> sepiaEffect <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c3dl.<span style="color: #660066;">Effect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				sepiaEffect.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">effects</span>.<span style="color: #660066;">SEPIA</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 				window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>objectsHit<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'_blank'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				objectsHit<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setEffect</span><span style="color: #009900;">&#40;</span>sepiaEffect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 					<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> arrayTwit.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>objectsHit<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">url</span> <span style="color: #339933;">==</span> scn.<span style="color: #660066;">getObj</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">url</span><span style="color: #009900;">&#41;</span>
 					scn.<span style="color: #660066;">getObject</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setEffect</span><span style="color: #009900;">&#40;</span>sepiaEffect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 					<span style="color: #009900;">&#125;</span>
 				<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span> 
&nbsp;
&nbsp;
        <span style="color: #003366; font-weight: bold;">function</span> onKeyUp<span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">89</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> keyD <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
        <span style="color: #003366; font-weight: bold;">function</span> mouseWheel<span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> delta <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Chromium</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">wheelDelta</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                delta <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>event.<span style="color: #660066;">wheelDelta</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #006600; font-style: italic;">// Minefield</span>
            <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">detail</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                delta <span style="color: #339933;">=</span> event.<span style="color: #660066;">detail</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>keyD<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    cam.<span style="color: #660066;">yaw</span><span style="color: #009900;">&#40;</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY <span style="color: #339933;">/</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// towards user</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        cam.<span style="color: #660066;">goFarther</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">*</span> <span style="color: #339933;">-</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// towards screen</span>
                    <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        cam.<span style="color: #660066;">goCloser</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>delta <span style="color: #339933;">*</span> ZOOM_SENSITIVITY<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
        <span style="color: #003366; font-weight: bold;">function</span> onKeyDown<span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">65</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                cam.<span style="color: #660066;">setOrbitPoint</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>event.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">89</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                keyD <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #003366; font-weight: bold;">function</span> mouseMove<span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">// get mouse coords relative to window</span>
            <span style="color: #003366; font-weight: bold;">var</span> mmx <span style="color: #339933;">=</span> event.<span style="color: #660066;">pageX</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
            <span style="color: #003366; font-weight: bold;">var</span> mmy <span style="color: #339933;">=</span> event.<span style="color: #660066;">pageY</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>mmx <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> mmy <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #006600; font-style: italic;">// NDC</span>
                <span style="color: #003366; font-weight: bold;">var</span> normalizedDeviceCoords <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
        <span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span> <span style="color: #339933;">*</span> mmx <span style="color: #339933;">/</span> CANVAS_WIDTH<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
       <span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span> <span style="color: #339933;">*</span> mmy <span style="color: #339933;">/</span> CANVAS_HEIGHT<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #006600; font-style: italic;">// Sometimes this is called before the perspective transform</span>
                <span style="color: #006600; font-style: italic;">// is setup which causes warnings. This check prevents that.</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c3dl.<span style="color: #660066;">isValidMatrix</span><span style="color: #009900;">&#40;</span>scn.<span style="color: #660066;">getProjectionMatrix</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> iproj <span style="color: #339933;">=</span> c3dl.<span style="color: #660066;">inverseMatrix</span><span style="color: #009900;">&#40;</span>scn.<span style="color: #660066;">getProjectionMatrix</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// To get the clip coords, we multiply the viewspace coordinates by</span>
                    <span style="color: #006600; font-style: italic;">// the projection matrix.</span>
                    <span style="color: #006600; font-style: italic;">// Working backwards across the pipeline, we have to take the normalized</span>
                    <span style="color: #006600; font-style: italic;">// device coordinates and multiply by the inverse projection matrix to get</span>
                    <span style="color: #006600; font-style: italic;">// the clip coordinates.</span>
                    <span style="color: #003366; font-weight: bold;">var</span> clipCoords <span style="color: #339933;">=</span> c3dl.<span style="color: #660066;">multiplyMatrixByVector</span><span style="color: #009900;">&#40;</span>iproj<span style="color: #339933;">,</span> normalizedDeviceCoords<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// perspective divide</span>
                    clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">/=</span> clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">/=</span> clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">/=</span> clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #003366; font-weight: bold;">var</span> rayInitialPoint <span style="color: #339933;">=</span> cam.<span style="color: #660066;">getPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> y <span style="color: #339933;">=</span> clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> z <span style="color: #339933;">=</span> clipCoords<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #003366; font-weight: bold;">var</span> kludge <span style="color: #339933;">=</span> c3dl.<span style="color: #660066;">multiplyVector</span><span style="color: #009900;">&#40;</span>cam.<span style="color: #660066;">getLeft</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> viewMatrix <span style="color: #339933;">=</span> c3dl.<span style="color: #660066;">makePoseMatrix</span><span style="color: #009900;">&#40;</span>kludge<span style="color: #339933;">,</span> cam.<span style="color: #660066;">getUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> cam.<span style="color: #660066;">getDir</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> cam.<span style="color: #660066;">getPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #003366; font-weight: bold;">var</span> rayTerminalPoint <span style="color: #339933;">=</span> c3dl.<span style="color: #660066;">multiplyMatrixByVector</span><span style="color: #009900;">&#40;</span>viewMatrix<span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span>x<span style="color: #339933;">,</span> y<span style="color: #339933;">,</span> z<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> rayDir <span style="color: #339933;">=</span> c3dl.<span style="color: #660066;">normalizeVector</span><span style="color: #009900;">&#40;</span>rayTerminalPoint<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// get angle</span>
                    <span style="color: #003366; font-weight: bold;">var</span> angle <span style="color: #339933;">=</span> Math.<span style="color: #660066;">acos</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">*</span> rayDir<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> camHeight <span style="color: #339933;">=</span> rayInitialPoint<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #003366; font-weight: bold;">var</span> hyp <span style="color: #339933;">=</span> camHeight <span style="color: #339933;">/</span> Math.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    mx <span style="color: #339933;">=</span> hyp <span style="color: #339933;">*</span> rayDir<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> rayInitialPoint<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    my <span style="color: #339933;">=</span> hyp <span style="color: #339933;">*</span> rayDir<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    mz <span style="color: #339933;">=</span> hyp <span style="color: #339933;">*</span> rayDir<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> rayInitialPoint<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> twitterSearch<span style="color: #009900;">&#40;</span>searchTag<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">//console.log(searchTag);</span>
	arrayTwit <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
	arrayTwit <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                $.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://search.twitter.com/search.json?q=&quot;</span> <span style="color: #339933;">+</span> searchTag <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;callback=?&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data.<span style="color: #660066;">results</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                twitSeach <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">;</span>
                arrayTwit.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>twitSeach<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #006600; font-style: italic;">//c3dl.init();</span>
			c3dl.<span style="color: #660066;">addMainCallBack</span><span style="color: #009900;">&#40;</span>canvasMain<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;tweetTank&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            twitterSearch<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;fishing&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3R3aXR0ZXJTZWEvVHdlZXRUYW5rLmh0bWw=" title=\"TweetTank WebGL example Created with C3DL\" target=\"_blank\">Launch Experiment</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3R3aXR0ZXJTZWEuemlw" title=\"TweetTank WebGL example Created with C3DL Download\" target=\"_blank\">Download Code</a></p>
<p>I mentioned possibly creating a spider with silverlight.  I still would like to do that in the near future. <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovLzc0LjEyNS40NS4xMzIvc2VhcmNoP3E9Y2FjaGU6TlMwdFdTdHZFRllKOnd3dy5zaWx2ZXJsaWdodHNob3cubmV0L2l0ZW1zL0J1aWxkaW5nLWFuLWludGVyYWN0aXZlLXNwaWRlci1pbi1TaWx2ZXJsaWdodC5hc3B4K3NwaWRlcit3aXRoK3NpbHZlcmxpZ2h0JmFtcDtjZD0xJmFtcDtobD1lbiZhbXA7Y3Q9Y2xuayZhbXA7Z2w9dXMmYW1wO2NsaWVudD1maXJlZm94LWE=" title=\"Silverlight Spider\" target=\"_blank\">I found this cool silverlight examples and would like to study it</a>!  I have installed Visual Studio 2010 on my Windows boxes and it is awesome!</p>
<p>I have also been eying a new tutorial on the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlZnJhbWV3b3JrLm9yZy9ibG9nL2NvbnRlbnQvaHlwZS1nZXRzLWEtbmV3LWRvbWFpbi8=" title=\"What is the Hype Framework?\" target=\"_blank\">Hype Framework</a> in <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jb21wdXRlcmFydHMuY28udWsv" title=\"Computer Arts\" target=\"_blank\">ComputerArts</a> latest issue(174).  Has a really cool example that teaches you how to use Hype to make music drawings created by <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2NyZWF0aXZld2F4LmNvLnVrLw==" title=\"CreativeWax\" target=\"_blank\">Stewart Hamilton-Arrandale</a>.  I will learn from this code.  I could add this type of functionality into my KulerSplash.</p>
<p>I also found this resource recently on Objective-C really <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5mYWJpZW5zYW5nbGFyZC5uZXQv" title=\"Fabien's Cool - Code Review and Souce Code\" target=\"_blank\">cool web site it was nice of them to share so much</a> Fabien also has some cool JAVA examples as well.</p>
<p>WebGL libraries:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZw==" title=\"What is C3DL?\" target=\"_blank\">C3DL</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJpZXJhLmNvbS9jb3BwZXJsaWNodC8=" title=\"CopperLicht\" target=\"_blank\">CopperLicht</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zY2VuZWpzLm9yZy8=" title=\"SceneJS\" target=\"_blank\">SceneJS</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=808" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F18%2Fwebgl-tweettank-built-with-c3dl-part-1%2F&amp;linkname=WebGL%20TweetTank%20Built%20with%20C3DL%20Part%201"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/18/webgl-tweettank-built-with-c3dl-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is Apple Becoming the New Big Brother?</title>
		<link>http://i-create.org/2010/04/11/is-apple-becoming-the-new-big-brother/</link>
		<comments>http://i-create.org/2010/04/11/is-apple-becoming-the-new-big-brother/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 04:33:25 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[PC History]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PARC]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Xerox]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/11/is-apple-becoming-the-new-big-brother/</guid>
		<description><![CDATA[Once upon a time their was young Steve Jobs and he fearlessly forged ahead and helped shape the landscape of today&#8217;s personal computing. To tell you the truth Macintosh was for the most part based off of the work that was done at PARC ( Palo Alto Research Center ) at the time PARC was [...]]]></description>
			<content:encoded><![CDATA[<p><object width="320" height="250"><param name="movie" value="http://www.youtube.com/v/JfIgzSoTMOs&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JfIgzSoTMOs&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="250"></embed></object></p>
<p>Once upon a time their was young Steve Jobs and he fearlessly forged ahead and helped shape the landscape of today&#8217;s personal computing.  To tell you the truth Macintosh was for the most part based off of the work that was done at PARC ( <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9QQVJDXyUyOGNvbXBhbnklMjk=" title=\"What is PARC?\" target=\"_blank\">Palo Alto Research Center </a>) at the time PARC was run by Xerox.  The wonderful people at Xerox worked night and day on <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9BcHBsZV9MaXNh" title=\"What is LISA?\" target=\"_blank\">LISA</a> which was the first GUI (Graphical User Interface) for personal computing.  Some of the brightest luminaries in Computer history worked at PARC like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9BbGFuX0theQ==" title=\"Who is Alan Kay?\" target=\"_blank\">Alan Kay</a> the father of OOP.  This was at a time though when most people had no idea that personal computing would explode. Most of the people that were employed at PARC were of course heavily influenced by <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Eb3VnbGFzX0VuZ2VsYmFydA==" title=\"Who is Douglas Engelbart ?\" target=\"_blank\">Douglas Engelbart</a> who ran the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Nsb2FuLnN0YW5mb3JkLmVkdS9Nb3VzZVNpdGUvQXJjaGl2ZS9Qb3N0NjgvRmluYWxSZXBvcnQxOTY4L3N0dWR5NjhyZWZlcmVuY2VzLmh0bWw=" title=\"What is the Human Augmentation Project?\" target=\"_blank\">Human Augmentation Project</a> at SAIL ( Stanford Artificial Intelligence Laboratory ).  At this time in computing people believed that AI (Artificial Intelligence) would be everything because evidently the common man was believed to simply be too stupid to use computers in everyday life.  You had a few mavericks at the time that of course did not subscribe to this ideology this group developed the first mouse and many of the interface devices we still use today in the late sixties at Stanford under the guidance of Engelbart.  The interface that was developed at PARC had many of the same features that Engelbart&#8217;s Human Augmentation project had created the precusor to the LISA interface and at this time Piracy really wasn&#8217;t considered a crime.  At this time you also had people in the valley that were bright enough to pick up on the fact that the rate of Computing Power was exponential and it was doubling every two years this of course later became known as <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Nb29yZSUyN3NfbGF3" title=\"What is Moore's Law?\" target=\"_blank\">Moore&#8217;s Law</a>.   Douglas Engelbart understood this fact and predicted things like the pocket library which is now pretty much your smart phone or iPad.  Steve Jobs has been extremly successful in making his childhood dreams a reality.  This of course only came about with failure and constant work, ambition to push things further and further and he has radically changed the history of personal computing for the most part for the betterment of all mankind.  Although Steve Jobs beginning was literally taking LISA&#8217;s beginning from Xerox and refitting it to the Macintosh.  Simply because the people at Xerox had no idea of the caliber of intellectual property they owned at the time sad really.  It was somewhat shady business moves like this that literally spawned personal computing.</p>
<p><object width="320" height="250"><param name="movie" value="http://www.youtube.com/v/OYecfV3ubP8&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OYecfV3ubP8&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="250"></embed></object></p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3RoZWZsYXNoYmxvZy5jb20vP3A9MTg4OA==" title=\"Apple's New SDK :(\" target=\"_blank\">Recently though Apple has made in my mind some rather bothersome decisions</a>.  I fully understand them not wanting to include Flash as a part of their ecosystem.  This definitely comes from the need to dominate their platform and insure the sales of apps on the iTunes store.  If everyone had the flash player would so many apps actually be sold??  I don&#8217;t believe they would be.  Up until now Apple devices have had relatively low computing power but this is no longer the case with the iPad.  Lots of developers have banded together and created some really cool tools out their like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3VuaXR5M2QuY29tLw==" title=\"What is Unity3D?\" target=\"_blank\">Unity3D</a>, <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Fuc2NhbW9iaWxlLmNvbS9mYXEv" title=\"Corona SDK\" target=\"_blank\">Corona SDK</a>, <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hcHBjZWxlcmF0b3IuY29tLw==" title=\"What is Appcelerator?\" target=\"_blank\">Appcelerator</a>, etc which by the way really creates a considerable amount of those casual games you play on your iPhone.  Recently Apple announced they would not allow 3rd party tools to compile to the iPhone / iPad.  This is extremely troublesome for developers.  I will be honest I love technology and for the most part I consider myself technologically agnostic as in I don&#8217;t really believe that one Technology is the complete answer.  I am completely for learning new technologies, languages etc.  I like Objective-C have played around with it a little and I also own several books on it.  I also like other technologies like Flash and when Adobe mentioned they were bringing the ability to compile directly to the iPhone / iPad I was of course elated.  The reason why is quite simple I want to utilize existing skills and compile to as many platforms as possible with a minimal amount of rework to get applications to work on a given device and honestly when it comes to this Adobe has that game down!  The flash community as a whole have spawned some of the coolest user interfaces ever put together period.  As a whole this community has really helped shape the future of computing and User Experience.  Many of the features of the current JavaScript libraries have been around in the flash community for years.  I mean you have to kind of laugh to yourself when the JavaScript community mentions something like easing these techniques were really defined well in the flash community and all you have to do to see this is simply do a <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5nb29nbGUuY29tL3NlYXJjaD9xPUVhc2luZytFcXVhdGlvbnMmYW1wO2llPXV0Zi04JmFtcDtvZT11dGYtOCZhbXA7YXE9dCZhbXA7cmxzPW9yZy5tb3ppbGxhOmVuLVVTOm9mZmljaWFsJmFtcDtjbGllbnQ9ZmlyZWZveC1h" title=\"Easing Equation Search\" target=\"_blank\">Google search on Easing Equations</a> you will find Robert Penner at the top.  I love both technologies and I really don&#8217;t want to be in one of those childish conversations where to whiners, whine about which one is better and which one will when over.  It is a silly argument to have in the first place.  As a developer it is important to have knowledge of both and not let your opinions cast doubt on one or the other platform.  HTML5 will advance to where flash is now but when it does flash will be well beyond where it is today.  So I guess I am upset at Apples decision to really kind of flip the bird to the development community and tell everyone they can only use their tools to create content or they have to use HTML5.  To be honest with you, I have been thinking about using HTML5 simply to escape the whole Apple approval process.  I will definitely be putting my weight around HTML5 and Flash for all the other Mobile platforms.  The people at Adobe are not lazy Steve.  They worked extremely hard to put together something that they believed would help your iTunes app store and consumers as well and it is not just the people at Adobe you have alienated by this decision.</p>
<p><object width="320"><param name="movie" value="http://www.youtube.com/v/6u8ynaCPIoY&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/6u8ynaCPIoY&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320"></embed></object></p>
<p>With the people at Apple making decisions like this you can&#8217;t help but wonder how far they will reach to control content.  I believe that content is up to the user hopefully they won&#8217;t extend policies like this to their bookstore.  Really the fact of the matter is people will purchase these devices in mass numbers because it was created by Apple and Apple does have a killer marketing strategy and team.  They won&#8217;t so much think about the lack of freedom or the buyer lockin to the iTunes ecosystem.  In many ways their ecosystem for entertainment is ridiculously far ahead of the competitors.  In short it is nothing short of a Monopoly you may not see it yet but it is definitely there.  On the other hand their moves may force the development community to swing to Microsoft and Google the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5lbmdhZGdldC5jb20vMjAxMC8wNC8wNS9ocC1zbGF0ZS10by1jb3N0LTU0OS1oYXZlLTEtNmdoei1hdG9tLXo1MzAtNS1ob3VyLWJhdHRlcnkv" title=\"What is HP Slate?\" target=\"_blank\">HP Slate</a> doesn&#8217;t look half bad.  I know, I will be developing for the iPhone and iPad I was just in the hopes to speed up my process I guess that looks like it is no longer an option.  I will in fact have to recreate the whole experience just for that device.</p>
<p><object width="320"><param name="movie" value="http://www.youtube.com/v/yKLrNgImm88&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yKLrNgImm88&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320"></embed></object></p>
<p>I wonder if the young Steve Jobs would do what he is doing today?</p>
<p>Well on a side note next weekend I might be posting code for a Twitter Spider created with Silverlight. Silverlight is cool!  I am of course looking forward to the Windows 7 phone and Visual Studio 2010!</p>
<p>Oh and last time I mentioned RayCasters <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2JydWNlLWxhYi5ibG9nc3BvdC5jb20vMjAwOS8wOC9hZG9iZS1hbGNoZW15LXJheS1jYXN0ZXItcG9ydC5odG1s" title=\"Alchemy Raycaster Port\" target=\"_blank\">Bruce Jawn released his source code for Alchemy</a> compiling of this <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zdHVkZW50Lmt1bGV1dmVuLmJlL35tMDIxNjkyMi9DRy9yYXljYXN0aW5nLmh0bWw=" title=\"RayCaster\" target=\"_blank\">RayCaster</a> you can find the code <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2JydWNlLWxhYi5ibG9nc3BvdC5jb20vMjAwOS8wOC9hZG9iZS1hbGNoZW15LXJheS1jYXN0ZXItcG9ydC5odG1s" title=\"Alchemy Raycaster Port\" target=\"_blank\">here</a>!  On his site you can find some cool examples of how to use Alchemy for Flash Development.</p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=807" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F11%2Fis-apple-becoming-the-new-big-brother%2F&amp;linkname=Is%20Apple%20Becoming%20the%20New%20Big%20Brother%3F"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/11/is-apple-becoming-the-new-big-brother/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Flip3D in ActionScript3</title>
		<link>http://i-create.org/2010/04/11/simple-flip3d-in-actionscript3/</link>
		<comments>http://i-create.org/2010/04/11/simple-flip3d-in-actionscript3/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 21:31:15 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QuickTip]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Experiment]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/11/simple-flip3d-in-actionscript3/</guid>
		<description><![CDATA[This code will show you how to develop a simple native actionscript3d Class it shows you two different methods you could use to develop your own flip 3d effect in ActionScript3 this uses Flash Player 10. This code also only uses the built in functionality of Flash with the exception of the use of Tweener [...]]]></description>
			<content:encoded><![CDATA[<p>This code will show you how to develop a simple native actionscript3d Class it shows you two different methods you could use to develop your own flip 3d effect in ActionScript3 this uses Flash Player 10.  This code also only uses the built in functionality of Flash with the exception of the use of <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3R3ZWVuZXIv" title=\"Tweener ActionScript Animation Library\" target=\"_blank\">Tweener</a> Class used in one of the way you could potentially animate it.  You could also use a 3d library like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2cucGFwZXJ2aXNpb24zZC5vcmcv" title=\"PaperVision3D\" target=\"_blank\">Papaervision3D</a> or <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20v" title=\"Away3D\" target=\"_blank\">Away3D</a> and these libraries would give your more options and greater control but this is just a simple 3D flip using rotationX property of flash.  This shows you how you might go about creating a Rolodex like effect in flash.  I have also made the code more reusable because it is a class of its own that can be linked to a flash movie clip dragged on the stage and then called and reused easily.  One of the many great features of flash is the ability to change visual objects into classes (Visual <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9PYmplY3Qtb3JpZW50ZWRfcHJvZ3JhbW1pbmc=" title=\"What is OOP?\" target=\"_blank\">OOP</a>) of there own rapidly! I have written code that basically once applied to a movie clip will randomly display a frame you will see this in the class you can expand it add new frames to the array etc..  What it does is randomly picks a frame displays the image and then once clicked will rotate the X property of the movie to about 84 degrees and disappear.  It also shows you two different ways you could accomplish this task.  One way the way I like the best is to use Tweener an animation library that has been around in the Flash community for years.  Tweener frees you from the time line in other words your animation is time based instead of frame based.  Time based is completely the way to go this ensures your users that they will have the same effect and performance regardless.  Time based animation effects have been around in the Flash community for years actually <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL1JvYmVydC1QZW5uZXJzLVByb2dyYW1taW5nLU1hY3JvbWVkaWEtRmxhc2gvZHAvMDA3MjIyMzU2MQ==" title=\"Robert Penner wrote an excellent book Programming Macromedia Flash MX\" target=\"_blank\">Robert Penner wrote an excellent book Programming Macromedia Flash MX</a> years ago I would recommend this book to anyone who is interested in learning the inner workings of easing equations for animation.  His book inspired many animation libraries to be built and his equations can actually be found in many JavaScript animation libraries as well.  Frame based animations tend to not always run at the speed of the Timeline FPS as a result they can lag and display a jumpy performance.  If you would like a frame based approach I have included one that show you you can call a click function and then tie it to an EnterFrame event and that triggers the animation if you so please.</p>
<p><a class=\"thickbox\" title=\"Simple Flip3D Flash Example\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvc2ltcGxlRmxpcDNEL2luZGV4Lmh0bWw/S2VlcFRoaXM9dHJ1ZSYjMDM4O1RCX2lmcmFtZT10cnVlJmFtcDtoZWlnaHQ9MzM4JiMwMzg7d2lkdGg9OTAw"><img src="http://i-create.org/actionscript/simpleFlip3D/simpleFlip3d_ActionScript3.jpg" alt="SimpleFlip3D in Flash"/></a></p>
<p>Call the Class from the Frame</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> flipID:uint = <span style="color: #000000; font-weight: bold;">new</span> uint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> sc9MainPortImg1:sc9MainPortImg = <span style="color: #000000; font-weight: bold;">new</span> sc9MainPortImg<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>sc9MainPortImg1<span style="color: #66cc66;">&#41;</span>;
sc9MainPortImg1.<span style="color: #006600;">x</span>=<span style="color: #cc66cc;">0</span>;
sc9MainPortImg1.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">55</span>;
sc9MainPortImg1.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;sc9Img&quot;</span>+flipID;
sc9MainPortImg1.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
sc9MainPortImg1.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_DOWN</span>, sc9PortClick<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> sc9PortClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #000000; font-weight: bold;">var</span> sc9MainPortImg1:sc9MainPortImg = <span style="color: #000000; font-weight: bold;">new</span> sc9MainPortImg<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChildAt<span style="color: #66cc66;">&#40;</span>sc9MainPortImg1,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
sc9MainPortImg1.<span style="color: #006600;">x</span>=<span style="color: #cc66cc;">0</span>;
sc9MainPortImg1.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">55</span>;	
sc9MainPortImg1.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;sc9Img&quot;</span>+flipID++;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>sc9MainPortImg1.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>;
sc9MainPortImg1.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
sc9MainPortImg1.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, sc9PortClick<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The actual Simple Flip 3D Class</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BitmapFilterQuality</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #0066CC;">LocalConnection</span>;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> sc9MainPortImg <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> n:<span style="color: #0066CC;">Number</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> sc9MainPortImg<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			randomFrame<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, spinClick<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> randomFrame<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> frameArray:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			frameArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #cc66cc;">1</span>;
			frameArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #cc66cc;">2</span>;
			frameArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #cc66cc;">3</span>;
			frameArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #cc66cc;">4</span>;
			<span style="color: #808080; font-style: italic;">// Get random number created</span>
			n=randRange<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>n<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>frameArray<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// gotoAndStop Frame lable name</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">gotoAndStop</span><span style="color: #66cc66;">&#40;</span>frameArray<span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> spinClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//this.addEventListener(Event.ENTER_FRAME, spin); --&gt; Enable for Frame Based Animation Example </span>
			<span style="color: #000000; font-weight: bold;">var</span> open_tween=<span style="color: #66cc66;">&#123;</span>rotationX:-<span style="color: #cc66cc;">84</span>,alpha:<span style="color: #cc66cc;">0.0</span>,<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">20</span>,transition:<span style="color: #ff0000;">&quot;easeoutelastic&quot;</span>,delay:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">this</span>, open_tween<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> spin<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">rotationX</span> -= <span style="color: #cc66cc;">2</span>;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">rotationX</span> == -<span style="color: #cc66cc;">84</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">visible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
				<span style="color: #0066CC;">this</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, spin<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> randRange<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">min</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">max</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// Generate a number between and including min - max</span>
				<span style="color: #000000; font-weight: bold;">var</span> randomNum:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">floor</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>max-<span style="color: #0066CC;">min</span>+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0066CC;">min</span>;
				<span style="color: #b1b100;">return</span> randomNum;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a class=\"thickbox\" title=\"Simple Flip3D Flash Example\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvc2ltcGxlRmxpcDNEL2luZGV4Lmh0bWw/S2VlcFRoaXM9dHJ1ZSYjMDM4O1RCX2lmcmFtZT10cnVlJmFtcDtoZWlnaHQ9MzM4JiMwMzg7d2lkdGg9OTAw">Launch Experiment</a> / <a title=\"Download the Code - Simple Flip3D Flash Example\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvc2ltcGxlRmxpcDNELnppcA==">Download Code</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=801" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F11%2Fsimple-flip3d-in-actionscript3%2F&amp;linkname=Simple%20Flip3D%20in%20ActionScript3"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/11/simple-flip3d-in-actionscript3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Abstract Lines Experiment</title>
		<link>http://i-create.org/2010/04/11/jquery-abstract-lines-experiment/</link>
		<comments>http://i-create.org/2010/04/11/jquery-abstract-lines-experiment/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 19:12:06 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[QuickTip]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/11/jquery-abstract-lines-experiment/</guid>
		<description><![CDATA[I have put together a simple experiment that draws semi-transparent lines on an HTML page incrementally for no particular purpose.  This is something I can do with ActionScript the difference is this experiment in ActionScript would be 3 times faster and I would have greater control not only would it be faster but it would [...]]]></description>
			<content:encoded><![CDATA[<p>I have put together a simple experiment that draws semi-transparent   lines on an HTML page incrementally for no particular purpose.  This is something I can do with ActionScript the difference is this experiment  in ActionScript would be 3 times faster and I would have greater control   not only would it be faster but it would also work on every browser and render the exact same way.  I do like JavaScript but it is not   substitution for ActionScript or C#.  Someday I am quite sure it will mature and more and more libraries of code will be ported over but the expectation for things to render the same way cross browser is a long   ways away form a reality.  HTML5 is simply not a Flash or Silverlight Killer. I also know that browsers will need faster JavaScript engines more like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3Y4Lw==" title=\"v8 JavaScript Engine\" target=\"_blank\">Google&#8217;s Chrome V8</a> to compete with browser plugins.  I love ActionScript I find it to be a powerful fast solution   with stunning results that cannot be found on the web else where.  In the future I think I will focus most of my JavaScript experiments on jQuery using <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcv" title=\"processingJS\" target=\"_blank\">processingJS</a> because processing is easy to use fast and is   the weapon of choice I believe for making really cool data visualization mashups.  In this experiment I used a jQuery timer to execute drawing   of lines on the page.  It is a relatively easy experiment and didn&#8217;t take long to make and was fun to create so here you go.</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2Fic3RyYWN0TGluZXMvbGluZXMuaHRtbA==" title=\"simple jQuery Abstract line experiment\" target=\"_blank\"><img src="http://i-create.org/JavaScript/abstractLines/simpleAbstractLines.jpg" alt="simple jQuery Abstract line experiment" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> bg <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;lineBg&quot;&gt;&amp;nbsp;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> lpos <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> lint <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> midPoint<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> lineCount <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> mainWidth <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
mainWidth <span style="color: #339933;">=</span> mainWidth <span style="color: #339933;">-</span> <span style="color: #CC0000;">15</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> mainHeight <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
midPoint <span style="color: #339933;">=</span> mainHeight <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> goLines<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>bg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.lineBg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span> midPoint <span style="color: #339933;">-</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.lineBg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.lineBg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">everyTime</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">200</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>lineCount<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	lineCount<span style="color: #339933;">++;</span>									
    randomLines<span style="color: #009900;">&#40;</span>lineCount<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">700</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> randomLines<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>	
<span style="color: #003366; font-weight: bold;">var</span> l1 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div id=&quot;'</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> l2 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&quot; class=&quot;line&quot;&gt;&amp;nbsp;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
	 <span style="color: #003366; font-weight: bold;">var</span> l <span style="color: #339933;">=</span> l1<span style="color: #339933;">+</span>i<span style="color: #339933;">+</span>l2<span style="color: #339933;">;</span>	
	 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>l<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> getLeftPos<span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>mainWidth<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>isEven<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span>midPoint<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>rotate<span style="color: #339933;">:</span> getRotation<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> height<span style="color: #339933;">:</span> getScale<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> opacity<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=0.5'</span><span style="color: #339933;">,</span> backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">'#01a6fb'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	 <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
	 <span style="color: #003366; font-weight: bold;">var</span> neg <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span>midPoint <span style="color: #339933;">-</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>rotate<span style="color: #339933;">:</span> getRotation<span style="color: #009900;">&#40;</span>neg<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> height<span style="color: #339933;">:</span> getScale<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> opacity<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=0.5'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	 
	 <span style="color: #009900;">&#125;</span>
	  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getLeftPos<span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>mainWidth<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	lPos <span style="color: #339933;">=</span> i<span style="color: #339933;">;</span>
	lPos <span style="color: #339933;">*=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>lint <span style="color: #339933;">&gt;</span> mainWidth<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		lint <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>lPos <span style="color: #339933;">&gt;</span> mainWidth<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		lPos <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">+</span> lint<span style="color: #339933;">++;</span>
		lPos <span style="color: #339933;">*=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Width &quot;</span> <span style="color: #339933;">+</span> mainWidth<span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; lPos &quot;</span> <span style="color: #339933;">+</span> lPos <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; lint &quot;</span> <span style="color: #339933;">+</span>lint <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">return</span> lPos<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> isEven<span style="color: #009900;">&#40;</span>num<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">%</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getRotation<span style="color: #009900;">&#40;</span>neg<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>neg <span style="color: #339933;">==</span> undefined<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> rotation <span style="color: #339933;">=</span> Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">100</span><span style="color: #339933;">-</span><span style="color: #CC0000;">50</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> rotation <span style="color: #339933;">=</span> <span style="color: #3366CC;">'-='</span> <span style="color: #339933;">+</span> rotation.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Neg &quot;</span> <span style="color: #339933;">+</span> rotation<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> rotation <span style="color: #339933;">=</span> Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">300</span><span style="color: #339933;">-</span><span style="color: #CC0000;">50</span><span style="color: #339933;">;</span>	
<span style="color: #003366; font-weight: bold;">var</span> rotation <span style="color: #339933;">=</span> <span style="color: #3366CC;">'+='</span> <span style="color: #339933;">+</span> rotation.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Pos &quot;</span> <span style="color: #339933;">+</span> rotation<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">return</span> rotation<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getScale<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> scale <span style="color: #339933;">=</span> Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">300</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> scale <span style="color: #339933;">=</span> <span style="color: #3366CC;">'+='</span> <span style="color: #339933;">+</span> scale.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">return</span> scale<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 					   
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>						   
 goLines<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Please don't use this browser it lacks HTML5 capablites and is the bane of Web Development!  Go get &lt;a href='http://www.google.com/chrome/index.html' target='_blank'&gt;Chrome&lt;/a&gt;, &lt;a href='http://www.mozilla.com/en-US/firefox/upgrade.html' target='_blank'&gt;Firefox&lt;/a&gt;, &lt;a href='http://www.apple.com/safari/download/' target='_blank'&gt;Safari&lt;/a&gt;, something!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2Fic3RyYWN0TGluZXMvbGluZXMuaHRtbA==" title=\"simple jQuery Abstract line experiment\" target=\"_blank\">Launch Experiment</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2Fic3RyYWN0TGluZXMuemlw" title=\"Download Source of simple jQuery Abstract line experiment\" target=\"_blank\">Download Code</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=798" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F11%2Fjquery-abstract-lines-experiment%2F&amp;linkname=jQuery%20Abstract%20Lines%20Experiment"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/11/jquery-abstract-lines-experiment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple jQuery Flower Experiment</title>
		<link>http://i-create.org/2010/04/05/simple-jquery-flower-experiment/</link>
		<comments>http://i-create.org/2010/04/05/simple-jquery-flower-experiment/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 04:00:12 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/05/simple-jquery-flower-experiment/</guid>
		<description><![CDATA[Simple flower experiment didn&#8217;t take to long this experiment uses jQuery.  This experiment didn&#8217;t take long to put together but at the same time I can&#8217;t help but think it would be better with Flash/Silverlight/Processing simply because of the way the browser doesn&#8217;t seem to be able to handle the PNG with semi-transparency and the [...]]]></description>
			<content:encoded><![CDATA[<p>Simple flower experiment didn&#8217;t take to long this experiment uses jQuery.  This experiment didn&#8217;t take long to put together but at the same time I can&#8217;t help but think it would be better with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9BZG9iZV9mbGFzaA==" title=\"What is Flash?\" target=\"_blank\">Flash</a>/<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TaWx2ZXJsaWdodA==" title=\"What is Silverlight?\" target=\"_blank\">Silverlight</a>/<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Qcm9jZXNzaW5nXyUyOHByb2dyYW1taW5nX2xhbmd1YWdlJTI5" title=\"What is Processing?\" target=\"_blank\">Processing</a> simply because of the way the browser doesn&#8217;t seem to be able to handle the PNG with semi-transparency and the animation ends up being kind of slow might have been better if I would have used <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3NpbmdKUy5vcmc=" title=\"ProcessingJS\" target=\"_blank\">ProcessingJS</a>, but at the same time it was an idea I had and took all of about a half hour to produce.  While searching for a plugin that could rotate the object I also <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2cucGFya2VyZm94LmNvLnVrLzIwMDkvMDkvMjIvYmV6aWVyLWN1cnZlcy1hbmQtYXJjcy1pbi1qcXVlcnkv" title=\"Cool jQuery Plugin\" target=\"_blank\">found</a> a cool <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3dlZXB5LmdpdGh1Yi5jb20vanF1ZXJ5LnBhdGgv" title=\"Cool jQuery plugin for bezier, curves, and arcs!\" target=\"_blank\">bezier, curve, arc</a> plugin and really it is kind of fun to play around with jQuery.  This was kind of fun to make although it also kind of reminds me of playing around with a Mandala kids toolkit for drawing (you know those simple toolkits where you get a wheel and you spin it around to create various concentric circles).  Don&#8217;t get me wrong I like both JavaScript and technologies like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9BZG9iZV9mbGFzaA==" title=\"What is Flash?\" target=\"_blank\">Flash</a>/<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TaWx2ZXJsaWdodA==" title=\"What is Silverlight?\" target=\"_blank\">Silverlight</a>/<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Qcm9jZXNzaW5nXyUyOHByb2dyYW1taW5nX2xhbmd1YWdlJTI5" title=\"What is Processing?\" target=\"_blank\">Processing</a> but I see those technologies being able to handle extreme graphic rendering extremely well and more importantly consistently.  The catch with no plugin has always been browser support.  Maybe that will go away if the next generation browser all implement the new technologies consistently but honestly I don&#8217;t see that happening anytime soon.  I am also glad to hear that <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2dvb2dsZWNocm9tZXJlbGVhc2VzLmJsb2dzcG90LmNvbS8yMDEwLzAzL2Rldi1jaGFubmVsLXVwZGF0ZV8zMC5odG1s" title=\"Chrome with integrated Flash Player!\" target=\"_blank\">flash is going to be integrated into chrome</a>!  I think flash should honestly be integrated directly into the browsers.  It is also exciting to see the new browsers supporting <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Fyc3RlY2huaWNhLmNvbS93ZWIvbmV3cy8yMDEwLzA0L2h0bWw1LWFuZC13ZWJnbC1icmluZy1xdWFrZS10by10aGUtYnJvd3Nlci5hcnM=" title=\"QuakeII in WebGL noPlugin!\" target=\"_blank\">WebGL</a>.   I see adobe making future versions of flash with the ability to compile to Canvas just a hunch especially when you start to consider technologies like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2hheGUub3JnLw==" title=\"haXe\" target=\"_blank\">haXe</a> and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5qYW5nYXJvby5uZXQvaG9tZS8=" title=\"AS3 to JavaScript\" target=\"_blank\">jangaroo</a></p>
<p><a  title=\"Simple Flower Experiment with jQuery\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2Zsb3dlci9GbG93ZXIuaHRtbA==" target=\"_blank\"><img alt="simple jQuery Flower Experiment" src="http://i-create.org/JavaScript/flower/simpleFlower.jpg" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> bloom<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> scale <span style="color: #339933;">=</span> <span style="color: #CC0000;">120</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> rotation <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> flower <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;flower&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> flower2 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;flower2&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> flower3 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;flower3&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> flower4 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;flower4&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span><span style="color: #CC0000;">40</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>flower<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>flower2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>flower4<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>flower3<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>rotate<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=20deg'</span><span style="color: #339933;">,</span> scale<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=0.06'</span><span style="color: #339933;">,</span> opacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.90</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>rotate<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=40deg'</span><span style="color: #339933;">,</span> scale<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=0.04'</span><span style="color: #339933;">,</span> opacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.60</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower4'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower4'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower4'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>rotate<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=60deg'</span><span style="color: #339933;">,</span> scale<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=0.03'</span><span style="color: #339933;">,</span> opacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.30</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">800</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flower3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>rotate<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=80deg'</span><span style="color: #339933;">,</span> scale<span style="color: #339933;">:</span> <span style="color: #3366CC;">'+=0.01'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>						   
 bloom<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flowerBed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Please don't use this browser it lacks HTML5 capablites and is the bane of Web Development!  Go get &lt;a href='http://www.google.com/chrome/index.html' target='_blank'&gt;Chrome&lt;/a&gt;, &lt;a href='http://www.mozilla.com/en-US/firefox/upgrade.html' target='_blank'&gt;Firefox&lt;/a&gt;, &lt;a href='http://www.apple.com/safari/download/' target='_blank'&gt;Safari&lt;/a&gt;, something!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a title=\"Simple Flower Experiment with jQuery\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2Zsb3dlci9GbG93ZXIuaHRtbA==" target=\"_blank\">Launch Experiment</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L2Zsb3dlci56aXA=" title=\"experiment Source Code\">Download Code</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=791" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F05%2Fsimple-jquery-flower-experiment%2F&amp;linkname=Simple%20jQuery%20Flower%20Experiment"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/05/simple-jquery-flower-experiment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeBreaker a Game of Deduction</title>
		<link>http://i-create.org/2010/04/04/codebreaker-a-game-of-deduction/</link>
		<comments>http://i-create.org/2010/04/04/codebreaker-a-game-of-deduction/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 20:01:45 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[Game Creation]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[gameCreation]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[RayCasting]]></category>

		<guid isPermaLink="false">http://i-create.org/2010/04/04/codebreaker-a-game-of-deduction/</guid>
		<description><![CDATA[Let me first start of by simply telling you I have been reading Flash Game University by Gary Rosenzweig.  This is an excellent resource for anyone who wants to teach themselves how to create games.  The examples in the book are relatively simple but of course the logic that goes into creating them is not.  [...]]]></description>
			<content:encoded><![CDATA[<p>Let me first start of by simply telling you I have been reading <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL0FjdGlvblNjcmlwdC0zLTAtR2FtZS1Qcm9ncmFtbWluZy1Vbml2ZXJzaXR5L2RwLzA3ODk3MzcwMjcvcmVmPXNyXzFfMT9pZT1VVEY4JiMwMzg7cz1ib29rcyYjMDM4O3FpZD0xMjcwNDA3NDM3JiMwMzg7c3I9OC0x" title=\"Flash Game University by Gary Rosenzweig\" target=\"_blank\">Flash Game University by Gary Rosenzweig</a>.  This is an excellent resource for anyone who wants to teach themselves how to create games.  The examples in the book are relatively simple but of course the logic that goes into creating them is not.  While reading and studying the examples I have decide to convert some of the examples over to JavaScript not because I think JavaScript is better etc. etc. Personally I hate reading articles where people flame Adobe and say flash is dead etc.. Most of the time the people who write these articles can&#8217;t do both I can so I like both!  Simply because I thought it would help me along in the thinking process.  Some people play Bridge, Chess, Sudoku, or Crossword Puzzles to stay sharp I write code and study code to stay sharp.  So in his book he has an example that is similar to the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9NYXN0ZXJtaW5kXyUyOGJvYXJkX2dhbWUlMjk=" title=\"MasterMind board game\" target=\"_blank\">MasterMind board game</a>.  I decided to port over this game to JavaScript and have done this you can find the example by clicking <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=L0phdmFTY3JpcHQvY29kZUJyZWFrZXIvY29kZUJyZWFrZXIuaHRtbA==" target=\"_blank\" title=\"CodeBreaker a Game of Deduction\">here</a>. If you like this example please purchase his book it is an excellent book and this code was generated by studying his example so please pay him tribute and purchase the <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL0FjdGlvblNjcmlwdC0zLTAtR2FtZS1Qcm9ncmFtbWluZy1Vbml2ZXJzaXR5L2RwLzA3ODk3MzcwMjcvcmVmPXNyXzFfMT9pZT1VVEY4JmFtcDtzPWJvb2tzJmFtcDtxaWQ9MTI3MDQwNzQzNyZhbXA7c3I9OC0x" title=\"Flash Game University by Gary Rosenzweig\" target=\"_blank\">book</a> like I have.  A little background about the game if it says you have a correct spot and the correct color. If it says you have the correct color you have the correct color but it is in the incorrect spot.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> 		<span style="color: #006600; font-style: italic;">// constants</span>
        <span style="color: #003366; font-weight: bold;">const</span> numPegs <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">const</span> numColors <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">const</span> maxTries <span style="color: #339933;">=</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">const</span> horizOffset <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">const</span> vertOffset <span style="color: #339933;">=</span> <span style="color: #CC0000;">60</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">const</span> pegSpacing <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">const</span> rowSpacing <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// game play variables</span>
        <span style="color: #003366; font-weight: bold;">var</span> solution <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> solutionButtonArray<span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> turnNum<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// references to display objects</span>
		<span style="color: #003366; font-weight: bold;">var</span> buttonImages <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;img/cbBlack.png&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;img/cbGreen.png&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;img/cbYellow.png&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;img/cbPurple.png&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;img/cbRed.png&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;img/cbBlue.png&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> currentRow <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> currentText<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> currentButton<span style="color: #339933;">;</span>
	    <span style="color: #003366; font-weight: bold;">var</span> mainIds <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> myButton<span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">function</span> startGame<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>numPegs<span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">// random, from 0 to 4</span>
				<span style="color: #003366; font-weight: bold;">var</span> r <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>numColors<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
				solution.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			turnNum <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
			createPegRow<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	   <span style="color: #003366; font-weight: bold;">function</span> createPegRow<span style="color: #009900;">&#40;</span>start<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		   solutionButtonArray <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>start <span style="color: #339933;">==</span> undefined<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cbMainGame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> cbButton1 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;divCButton&quot; id=&quot;div'</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> cbButton2 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&quot; onclick=&quot;clickButton(this)&quot;&gt;&lt;img id=&quot;img'</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> cbButton3 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&quot; alt=&quot;0&quot; src=&quot;img/cbBlack.png&quot; /&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> mainWrapper1 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;mainWrapper&quot;&gt;'</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> mainWrapper2 <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
		   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cbMainGame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>mainWrapper1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> btnFinished <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;imgButton&quot; id=&quot;divButtonFinished'</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> btnFinished2<span style="color: #339933;">=</span> <span style="color: #3366CC;">'&quot;&gt;&lt;center&gt;&lt;div class=&quot;mainButton&quot; id=&quot;divButtonDone'</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> btnFinished3<span style="color: #339933;">=</span> <span style="color: #3366CC;">'&quot; onclick=&quot;executeGameQuery(this)&quot;&gt;&lt;span id=&quot;spnMainButton&quot;&gt;Done&lt;/span&gt;&lt;/div&gt;&lt;/center&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
	   	   currentRow <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>numPegs<span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cbMainGame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>cbButton1<span style="color: #339933;">+</span>mainIds<span style="color: #339933;">+</span>cbButton2<span style="color: #339933;">+</span>mainIds<span style="color: #339933;">+</span>cbButton3<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				solutionButtonArray.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;img&quot;</span><span style="color: #339933;">+</span>mainIds<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				mainIds<span style="color: #339933;">++;</span>
			<span style="color: #009900;">&#125;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cbMainGame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>btnFinished<span style="color: #339933;">+</span>mainIds<span style="color: #339933;">+</span>btnFinished2<span style="color: #339933;">+</span>mainIds<span style="color: #339933;">+</span>btnFinished3<span style="color: #339933;">+</span>mainWrapper2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	   <span style="color: #009900;">&#125;</span>
&nbsp;
	   <span style="color: #003366; font-weight: bold;">function</span> clickButton<span style="color: #009900;">&#40;</span>clicked<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> myButton <span style="color: #339933;">=</span> clicked<span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> img <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>clicked<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> imageToChange <span style="color: #339933;">=</span> img<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">alt</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>imageToChange <span style="color: #339933;">==</span> <span style="color: #CC0000;">6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			imageToChange <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>   
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #006600; font-style: italic;">//console.log(imageToChange);</span>
		   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>img<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;src&quot;</span><span style="color: #339933;">,</span>buttonImages<span style="color: #009900;">&#91;</span>parseInt<span style="color: #009900;">&#40;</span>imageToChange<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>img<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;alt&quot;</span><span style="color: #339933;">,</span> parseInt<span style="color: #009900;">&#40;</span>imageToChange<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	   <span style="color: #009900;">&#125;</span>
&nbsp;
	   <span style="color: #003366; font-weight: bold;">function</span> executeGameQuery<span style="color: #009900;">&#40;</span>mainButton<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> buttonClicked <span style="color: #339933;">=</span> mainButton<span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> changeThis <span style="color: #339933;">=</span> buttonClicked.<span style="color: #660066;">id</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> currentColorList <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> colorList <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> soltionList <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   changeThis <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>changeThis<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #006600; font-style: italic;">//console.log(changeThis);</span>
		   <span style="color: #003366; font-weight: bold;">var</span> numberCorrect <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> numberColorsCorrect <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
		   turnNum<span style="color: #339933;">++;</span>
		   <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>numPegs<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			   currentColorList.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>solutionButtonArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;alt&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>solutionButtonArray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onclick&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>numPegs<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentColorList<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> solution<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				  numberCorrect<span style="color: #339933;">++;</span>
			  <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
				  soltionList<span style="color: #009900;">&#91;</span>solution<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">++;</span>
				  colorList<span style="color: #009900;">&#91;</span>parseInt<span style="color: #009900;">&#40;</span>currentColorList<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">++;</span>
			  <span style="color: #009900;">&#125;</span>
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>numColors<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			   <span style="color: #003366; font-weight: bold;">var</span> test <span style="color: #339933;">=</span> Math.<span style="color: #660066;">min</span><span style="color: #009900;">&#40;</span>soltionList<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>colorList<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				numberColorsCorrect <span style="color: #339933;">=</span> numberColorsCorrect <span style="color: #339933;">+</span> Math.<span style="color: #660066;">min</span><span style="color: #009900;">&#40;</span>soltionList<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>colorList<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		   $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>buttonClicked.<span style="color: #660066;">id</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>numberCorrect <span style="color: #339933;">==</span> numPegs<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		   $<span style="color: #009900;">&#40;</span>changeThis<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'You Got It!&lt;br/&gt;&lt;div class=&quot;imgButton&quot;&gt;&lt;center&gt;&lt;div onclick=&quot;startGame()&quot; id=&quot;divButtonDone5&quot; class=&quot;mainButton&quot;&gt;&lt;span id=&quot;spnMainButton&quot;&gt;Play Again&lt;/span&gt;&lt;/div&gt;&lt;/center&gt;&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>turnNum <span style="color: #339933;">==</span> maxTries<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			   $<span style="color: #009900;">&#40;</span>changeThis<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'I regret to infrom you just lost next time do it quicker! &lt;br/&gt;&lt;div class=&quot;imgButton&quot;&gt;&lt;center&gt;&lt;div onclick=&quot;startGame()&quot; id=&quot;divButtonDone5&quot; class=&quot;mainButton&quot;&gt;&lt;span id=&quot;spnMainButton&quot;&gt;Play Again&lt;/span&gt;&lt;/div&gt;&lt;/center&gt;&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
		   $<span style="color: #009900;">&#40;</span>changeThis<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Correct Spot: &quot;</span><span style="color: #339933;">+</span>numberCorrect<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;, Correct Color: &quot;</span><span style="color: #339933;">+</span>numberColorsCorrect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #003366; font-weight: bold;">var</span> start <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		   createPegRow<span style="color: #009900;">&#40;</span>start<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span>
	   <span style="color: #009900;">&#125;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#cbMainGame'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>startGameHTML<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>						   
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=L0phdmFTY3JpcHQvY29kZUJyZWFrZXIvY29kZUJyZWFrZXIuaHRtbA==" target=\"_blank\" title=\"CodeBreaker a Game of Deduction\">Launch Game</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=L0phdmFTY3JpcHQvY29kZUJyZWFrZXIuemlw">Download Code</a></p>
<p>I have also been spending some time playing around with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xhYnMuYWRvYmUuY29tL3RlY2hub2xvZ2llcy9hbGNoZW15Lw==" title=\"Alchemy\" target=\"_blank\">Alchemy</a> last post I displayed some examples of <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9SYXlfY2FzdGluZw==" title=\"What is a Ray Caster?\" target=\"_blank\">RayCasters</a> the old style 3d of Games like Wolfenstien and Doom.  In short most of the raycasters out their follow this <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zdHVkZW50Lmt1bGV1dmVuLmJlL35tMDIxNjkyMi9DRy9yYXljYXN0aW5nLmh0bWw=" title=\"RayCaster Example\" target=\"_blank\">example</a>  this example is a c++ example and Adobe has a project in their labs   called Alchemy.  Alchemy allows you to port existing C/C++ to   ActionScript.  Which is really cool but also extremely difficult to do:)  Right now I need to rewrite a chunk of it that uses <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5saWJzZGwub3Jn" title=\"lib SDL\" target=\"_blank\">SDL lib</a> an old library that was used to create most video games years ago.  I searched to see if someone was doing something similar and sure enough   someone is  <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2JydWNlLWxhYi5ibG9nc3BvdC5jb20vMjAwOS8wOC9hZG9iZS1hbGNoZW15LXJheS1jYXN0ZXItcG9ydC5odG1s" title=\"RayCaster in Flash Via Alchemy\" target=\"_blank\">Bruce Jawn</a>.  He informed me that instead of using SDL I need to pass it to the screen buffer as a byte array.  So that is currently what I am trying to do he also mentioned posting his Make file under Google code in the near future.  Hopefully he does I have also noticed <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xpYi5oYXhlLm9yZy9wL25tZQ==" title=\"haXe SDL Wrapper\" target=\"_blank\">haXe has an SDL wrapper</a>.  This might also be   useful to study <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5iYWRzZWN0b3JhY3VsYS5jb20vcGVwb25pL3JheWZhc3RlcjIv" title=\"RayFaster2\" target=\"_blank\">RayFaster2</a> this is a RayCaster built with haXe that is super fast.  Their are   numerous examples of RayCasters written in ActionScript but I am looking for speed.  I might think about also just writing one from scratch and implementing a JavaScript version of it as well.  I could have spent   this weekend working on my new portfolio but unfortunately I didn&#8217;t do that:(  I will have to extend it deadline beyond the 4 days time limit   once again:(</p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=785" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F04%2F04%2Fcodebreaker-a-game-of-deduction%2F&amp;linkname=CodeBreaker%20a%20Game%20of%20Deduction"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/04/04/codebreaker-a-game-of-deduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next Chapter</title>
		<link>http://i-create.org/2010/03/28/next-chapter/</link>
		<comments>http://i-create.org/2010/03/28/next-chapter/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 03:54:12 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MashUp]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[ProcessingJS]]></category>
		<category><![CDATA[Yahoo Pipes]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=769</guid>
		<description><![CDATA[Well the good news is I am officially a Rich Internet Application Developer! So I will mainly be focusing on creating reusable controls with JavaScript and ActionScript for the retail store Hayneedle! I will miss working with all the wonderful developers at infoGroup. I was fortunate enough to start their as a Graphical User Interface [...]]]></description>
			<content:encoded><![CDATA[<p>Well the good news is I am officially a Rich Internet Application Developer!  So I will mainly be focusing on creating reusable controls with JavaScript and ActionScript for the retail store <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oYXluZWVkbGUuY29tLz9zb3VyY2U9Z29vZ2xlYXcmIzAzODtrd2lkPWhheW5lZWRsZSYjMDM4O3RpZD1leGFjdA==" title=\"Hayneedle\" target=\"_blank\">Hayneedle</a>!  I will miss working with all the wonderful developers at <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2luZm9ncm91cC5jb20v" title=\"infoGroup\" target=\"_blank\">infoGroup</a>.  I was fortunate enough to start their as a Graphical User Interface Developer and end as a Software Engineer.  I have learned a tremendous amount from working at infoGroup and will miss all of them.  I will also never forget all the knowledge they shared with me.  C# is an awesome language and so is Ruby on Rails!  I will continue to use both in the future!  While working at infoGroup I worked on numerous projects 2 newer versions of Salesgenie.com and one entirely new product SalesDesk a real-time CRM.   I utilized <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2pxdWVyeS5jb20v" title=\"jQuery\" target=\"_blank\">jQuery</a>, CSS, ASP.NET 2.0, ASP.NET 3.5 (MVC), and Ruby on Rails.  I will continue to learn and use new languages at my new post at Hayneedle I will be using ColdFusion, JavaScript, and ActionScript.  I think it will be fun to have a change of pace and I am really excited to be a part of their development / user experience group!  I believe this job will enable me to use my creative side a little more; so I think that will be enjoyable and I think I will learn a tremendous amount by working with the new team they are an extremely innovative group.  It is always good to challenge yourself and change things, and have new experiences, I will miss infoGroup.  This month I have been extremely busy I am currently working with two clients in the Omaha Metro area and I will be teaming up with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL21pbm9yd2hpdGVzdHVkaW9zLmNvbS9ibG9nLw==" title=\"MinorWhiteStudios\" target=\"_blank\">MinorWhiteStudios</a> on future projects so I am excited to be working with them.  I believe they are the best photographers / designers in town.  I hadn&#8217;t talked to Scott in years and it was nice of him to call me.  His whole team is extremely creative and I belive I will also learn a great deal working with them!</p>
<p>I have really been sitting around and reading a great deal at home.  I don&#8217;t get out much anymore.  I find myself playing with new technologies on my off time.  I have also been working on a game for a client of mine and hopefully I can have a demo of that soon!  Lately I have been playing around with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcv" title=\"ProcessingJS\" target=\"_blank\">ProcessingJS</a> and here is a new experiment.  This example uses a font from <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5kYWZvbnQuY29tL2xhdXJlbi10aG9tcHNvbi5kMTk5Nw==" title=\"DaFont\" target=\"_blank\">DaFont</a>.  This example also borrows from this <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Byb2Nlc3Npbmdqcy5vcmcvc291cmNlL2NhbnZhcy10ZXh0LWxpbmtzL2NhbnZhcy10ZXh0LWxpbmsuaHRtbA==" title=\"processin link example\" target=\"_blank\">example</a> thanks to <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGVyLW1ldHJpeC5jb20=" title=\"@F1LT3R\" target=\"_blank\">@F1LT3R</a> for sharing this example.  You know it&#8217;s fun using Processing with jQuery I will continue to watch and play with this framework because its fun:)</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3Byb2Nlc3NpbkpTX1lhaG9vUGlwZXMveWFob29QaXBlLmh0bWw=" target=\"_blank\" title=\"ProcessingJS and jQuery Simple MashUp\" ><img src="/JavaScript/processinJS_YahooPipes/processingMashUp.jpg" title="Processing JS mashUp using JSON and Yahoo Pipes" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> jData<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> objClik <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> colorPool <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#075997&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#079714&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#970744&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#079792&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#970769&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#078497&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;#970718&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;#075197&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;#079733&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#079707&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> loadFeed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	jQuery.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://pipes.yahoo.com/pipes/pipe.run?_id=2432dea4d4d6afa353c425dc5e542fb4&amp;_render=json&amp;_callback=?&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>json<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	jData <span style="color: #339933;">=</span> json<span style="color: #339933;">;</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#YahooPipe'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#YahooPipe'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	loadProcessing<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
<span style="color: #000066; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>jQuery.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
loadFeed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#result'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Sorry you are using Internet Explorer an inferior browser please utilize a next generation browser like FireFox, Chrome, or Safari!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>err<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#result'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Sorry Pipe Failed to Load Please refresh and try again:)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> loadProcessing<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> script <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'linkScript'</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'YahooPipe'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		Processing<span style="color: #009900;">&#40;</span>canvas<span style="color: #339933;">,</span> script<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  strokeWeight<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  noStroke<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  size<span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>jQuery<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  smooth<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
PFont font <span style="color: #339933;">=</span> loadFont<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Champagne_Limousines.svg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> jData.<span style="color: #660066;">value</span>.<span style="color: #660066;">items</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  int pointX <span style="color: #339933;">=</span> random<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>jQuery<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  int pointY <span style="color: #339933;">=</span> random<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>jQuery<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  int fSize <span style="color: #339933;">=</span> random<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">30</span><span style="color: #339933;">,</span><span style="color: #CC0000;">65</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  objClik.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> alinked<span style="color: #009900;">&#40;</span>pointX<span style="color: #339933;">,</span>pointY<span style="color: #339933;">,</span>fSize<span style="color: #339933;">,</span>jData.<span style="color: #660066;">value</span>.<span style="color: #660066;">items</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">link</span><span style="color: #339933;">,</span> jData.<span style="color: #660066;">value</span>.<span style="color: #660066;">items</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">title</span><span style="color: #339933;">,</span> colorPool<span style="color: #009900;">&#91;</span>Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> colorPool.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>colorPool<span style="color: #009900;">&#91;</span>Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> colorPool.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
  <span style="color: #009900;">&#125;</span>
  forLinks<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'render'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  exit<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> forLinks<span style="color: #009900;">&#40;</span>mode<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>int i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i <span style="color: #339933;">&lt;</span> objClik.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    t<span style="color: #339933;">=</span>objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>mode<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'render'</span><span style="color: #339933;">:</span>objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">render</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>break<span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'detect'</span><span style="color: #339933;">:</span>
        mouseX <span style="color: #339933;">&gt;</span> objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">x</span> <span style="color: #339933;">&amp;&amp;</span>   
        mouseY <span style="color: #339933;">&gt;</span> objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">y</span> <span style="color: #339933;">&amp;&amp;</span>
        mouseY <span style="color: #339933;">&lt;</span> objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">y</span><span style="color: #339933;">+</span>t.<span style="color: #660066;">size</span> <span style="color: #339933;">&amp;&amp;</span>
        mouseX <span style="color: #339933;">&lt;</span> objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">x</span><span style="color: #339933;">+</span>t.<span style="color: #660066;">anchorWidth</span><span style="color: #339933;">?</span>
          objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">rollOver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
          objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">rollOut</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'clicks'</span><span style="color: #339933;">:</span>objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">mouseOver</span><span style="color: #339933;">?</span>objClik<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">clicked</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> mouseMoved<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>forLinks<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'detect'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">void</span> mouseClicked<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>forLinks<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'clicks'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">class</span> alinked<span style="color: #009900;">&#123;</span>
  boolean mouseOver<span style="color: #339933;">;</span>
  color current_col<span style="color: #339933;">;</span>
  float anchorWidth<span style="color: #339933;">;</span>
  alinked<span style="color: #009900;">&#40;</span>float x<span style="color: #339933;">,</span> float y<span style="color: #339933;">,</span> float size<span style="color: #339933;">,</span> String href<span style="color: #339933;">,</span>String anchor<span style="color: #339933;">,</span> Color text_col<span style="color: #339933;">,</span> Color hover_col<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    href<span style="color: #339933;">=</span>href<span style="color: #339933;">;</span>    
    anchor<span style="color: #339933;">=</span>anchor<span style="color: #339933;">;</span>    
    <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">size</span><span style="color: #339933;">=</span>size<span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">x</span><span style="color: #339933;">=</span>x<span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">y</span><span style="color: #339933;">=</span>y<span style="color: #339933;">;</span>
    text_col<span style="color: #339933;">=</span>text_col<span style="color: #339933;">;</span>
    hover_col<span style="color: #339933;">=</span>hover_col<span style="color: #339933;">;</span>
    current_col<span style="color: #339933;">=</span>text_col<span style="color: #339933;">;</span>
    mouseOver<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>    
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">void</span> render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    anchorWidth<span style="color: #339933;">=</span>font.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span>anchor<span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>size<span style="color: #339933;">;</span>    
    clear<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>anchorWidth<span style="color: #339933;">,</span>size<span style="color: #339933;">+</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    textFont<span style="color: #009900;">&#40;</span>font<span style="color: #339933;">,</span>size<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>current_col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    mouseOver<span style="color: #339933;">?</span>rect<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">+</span>size<span style="color: #339933;">+</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>anchorWidth<span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
    text<span style="color: #009900;">&#40;</span>anchor<span style="color: #339933;">,</span>x<span style="color: #339933;">,</span>y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">void</span> rollOver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>mouseOver<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>      
      mouseOver<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
      cursor<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'pointer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      current_col<span style="color: #339933;">=</span>hover_col<span style="color: #339933;">;</span>
      render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">void</span> rollOut<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>mouseOver<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      mouseOver<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      cursor<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'auto'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      current_col<span style="color: #339933;">=</span>text_col<span style="color: #339933;">;</span>
      render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">void</span> clicked<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    link<span style="color: #009900;">&#40;</span>href<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;_blank&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3Byb2Nlc3NpbkpTX1lhaG9vUGlwZXMveWFob29QaXBlLmh0bWw=" target=\"_blank\" title=\"ProcessingJS and jQuery Simple MashUp\" >Launch Example</a> / <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9KYXZhU2NyaXB0L3Byb2Nlc3NpbkpTX1lhaG9vUGlwZXMuemlw" target=\"_blank\" title=\"ProcessingJS and jQuery Simple MashUp Code Download\" >Download Example</a></p>
<p>This experiment simply grabs a yahoo pipe parses the JSON and then adds the links to the Canvas tag.  It is really amazing to see all the progress of HTML5 and all the cool new JavaScript libraries.  Please note internet explorer users will not be able to view this example because IE does not support the Canvas tag:(.  Sometimes I have also noticed it fails to capture the JSON but I have a try catch so it should tell you to try again.  I am not going to add a JAVA version of this project simply because I don&#8217;t have time too right now. I noticed ProcessingJS is now supporting some of the 3D functions of Processing (JAVA) I haven&#8217;t had time to play with them lately but I will make a data mashup with it as soon as I can find the time.  I am also still working on my new Portfolio the never ending project maybe within the next two weeks I will actually post it!  I am looking forward to <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2NzNS5vcmcv" title=\"CS5!\" target=\"_blank\">CS5</a> and purchasing Flash Builder 4!   I have also noticed that with libraries like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NjcmlwdHkyLmNvbS8=" title=\"Scripty2\" target=\"_blank\">Scripty2</a> it might be a fun to port over some Flash Games (AS2) utilize JavaScript so they can be enjoyed with out a plugin!</p>
<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5icmlnaHRodWIuY29tL2h1YmZvbGlvL21hdHRoZXctY2FzcGVyc29uL2Jsb2cvYXJjaGl2ZS8yMDA5LzA3LzA4L2ZsYXNoLWFuZC1qYXZhc2NyaXB0LTNkLXdpdGgtc2FuZHktaHguYXNweA==" title=\"Sandy3D haXe 2 JavaScript Examples\" target=\"_blank\">Sandy3D haXe 2 JavaScript Examples</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hbnNjYW1vYmlsZS5jb20vY29yb25hLw==" title=\"Corona SDK \" target=\"_blank\">Corona SDK </a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zcHJvdXRjb3JlLmNvbS8=" title=\"SproutCore JavaScript FrameWork\" target=\"_blank\">SproutCore JavaScript FrameWork</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NjcmlwdHkyLmNvbS8=" title=\"Scripty2 JavaScript Framework\" target=\"_blank\">Scripty2</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zdHVkZW50Lmt1bGV1dmVuLmJlL35tMDIxNjkyMi9DRy9yYXljYXN0aW5nLmh0bWw=" title=\"Excellent C++ RayCaster Example\" target=\"_blank\">Excellent C++ RayCaster Example</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2FqYXhuYS5jb2RlcGxleC5jb20v" title=\"Ajax RayCaster Example\" target=\"_blank\">Ajax RayCaster Example</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3JheWNhc3RlcnguY29kZXBsZXguY29tLw==" title=\"XNA C# RayCaster\" target=\"_blank\">XNA C# RayCaster</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=769" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F03%2F28%2Fnext-chapter%2F&amp;linkname=Next%20Chapter"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/03/28/next-chapter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery CenterIT</title>
		<link>http://i-create.org/2010/02/07/jquery-centerit/</link>
		<comments>http://i-create.org/2010/02/07/jquery-centerit/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 00:37:54 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[QuickTip]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[webGL]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=765</guid>
		<description><![CDATA[Have you ever had to deal with the hassle of centering modal windows? I made this function to automagically center windows I call this function after I load a modal and it centers the object perfectly for every browser. It takes the hassle of wondering if something is perfectly center in every browser. The only [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever had to deal with the hassle of centering modal windows?  I made this function to automagically center windows I call this function after I load a modal and it centers the object perfectly for every browser.  It takes the hassle of wondering if something is perfectly center in every browser.  The only thing I do to use it is send it the main containing div that the object should be centered in and the div that I want to be centered.  It grabs the offset does a little basic math and that&#8217;s it.  No more hassle with centering now it will be perfectly centered.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> CenterIT<span style="color: #009900;">&#40;</span>mainModal<span style="color: #339933;">,</span> mainContainer<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> modalW <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>mainModal<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> windowW <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>mainContainer<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> modalH <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>mainModal<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> windowH <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>mainContainer<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> centerPointW <span style="color: #339933;">=</span> windowW <span style="color: #339933;">-</span> modalW<span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> centerPointH <span style="color: #339933;">=</span> windowH <span style="color: #339933;">-</span> modalH<span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> myPoint <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>mainContainer<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    centerPointW <span style="color: #339933;">=</span> myPoint.<span style="color: #660066;">left</span> <span style="color: #339933;">+</span> centerPointW<span style="color: #339933;">;</span>
    centerPointH <span style="color: #339933;">=</span> myPoint.<span style="color: #660066;">top</span> <span style="color: #339933;">+</span> centerPointH<span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span>mainModal<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span> centerPointW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span>mainModal<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span> centerPointH<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Some Useful/Interesting Flash Links:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jbG9zaWVyLm5sL3ByZWZhYi8=" title=\"PreFab\" target=\"_blank\">Prefab</a> &#8211; Highly useful tool when it comes to 3D in flash with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20v" title=\"Away3D\" target=\"_blank\">Away3D</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3Nub29rLmNhL2FyY2hpdmVzL29waW5pb24vYWRvYmUtaHRtbDUtY2FudmFz" title=\"Snook on HTML5 and Adobe\" target=\"_blank\">Snook on HTML5 and Adobe</a></p>
<p>Some Useful/Interesting JavaScript Links:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hcmd1aW5nd2l0aG15c2VsZi5jb20vYXJjaGl2ZXMvMTI0LXJheWNhc3Rlci12ZXJzaW9uLTU=" title=\"RayCaster\" target=\"_blank\">Javascript RayCaster</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5oeXBlci1tZXRyaXguY29tLyNCdXJzdA==" title=\"Burst Engine\" target=\"_blank\">Burst Engine for SVG in JavaScript</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5jM2RsLm9yZy8=" title=\"Canvas 3D\" target=\"_blank\">Canvas 3D</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy53eHMuY2EvanMzZC8jZGVtb3M=" title=\"JS3D\" target=\"_blank\">JS3D library</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2FqYXhpYW4uY29tL2FyY2hpdmVzLzNkY3NzP3V0bV9zb3VyY2U9ZmVlZGJ1cm5lciYjMDM4O3V0bV9tZWRpdW09ZmVlZCYjMDM4O3V0bV9jYW1wYWlnbj1GZWVkJTNBK2FqYXhpYW4rJTI4QWpheGlhbitCbG9nJTI5" title=\"Parallax in CSS\" target=\"_blank\">Parallax in CSS</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5yb3plbmdhaW4uY29tL2Jsb2cvMjAxMC8wMi8wNC9ibGVuZGVyLXRvLXdlYmdsLWphdmFzY3JpcHQtZXhwb3J0ZXIv" title=\"WebGL\" target=\"_blank\">WebGL Example</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=765" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F02%2F07%2Fjquery-centerit%2F&amp;linkname=jQuery%20CenterIT"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/02/07/jquery-centerit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>404 Errors Hyped With PaperVision3d pt. 2</title>
		<link>http://i-create.org/2010/02/07/404-errors-hyped-with-papervision3d-pt-2/</link>
		<comments>http://i-create.org/2010/02/07/404-errors-hyped-with-papervision3d-pt-2/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 20:14:32 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[MashUp]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=761</guid>
		<description><![CDATA[Capture URL for search with JavaScript and Pass it to Flash Search Google from URL parsing Use of Random Range Create an Array of Spheres that holds the Google results Apply the title field to a Text3D and add that as a child to the Sphere Apply an Event to the Sphere to navigate to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NlYWNsb3VkOS5vcmcvUHJvY2Vzc2luZy5vcmc=" title=\"404 Error MashUp\" target=\"_blank\"><br />
<img src="http://i-create.org/img404e.jpg" title="404 Error MashUp" /></a></p>
<ol>
<li>Capture URL for search with JavaScript and Pass it to Flash</li>
<li>Search Google from URL parsing</li>
<li>Use of Random Range</li>
<li>Create an Array of Spheres that holds the Google results</li>
<li>Apply the title field to a Text3D and add that as a child to the Sphere</li>
<li>Apply an Event to the Sphere to navigate to the Google result.</li>
<li>How to trace out events from flash to Firebug</li>
</ol>
<p>This tutorial uses the following libraries of code:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGUuam9zaHVhZGF2aXMuY29t" title=\"Hype\" target=\"_blank\">Hype</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2cucGFwZXJ2aXNpb24zZC5vcmcv" title=\"PaperVision3d\" target=\"_blank\">PaperVision3d</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL2dvb2dsZWFzM2FwaS8=" title=\"googleas3api\" target=\"_blank\">googleas3api</a></p>
<p>I chose to omit the parallax effect.  You can find an excellent example of the parallax effect on <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2dvdG9hbmRsZWFybi5jb20=" title=\"parallax effect\" target=\"_blank\">gotoandlearn.com</a>, <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5uZXRtYWcuY28udWsvemluZS9mbGFzaC0xL3RoZS1hcnQtb2YtcGFyYWxsYXgtc2Nyb2xsaW5n" title=\".Net Paralax Effect\" target=\"_blank\">.Net</a> , and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=IGh0dHA6Ly93d3cud2ViZGVzaWduZXJtYWcuY28udWsvdHV0b3JpYWwtZmlsZXMvaXNzdWUtMTY1LXR1dG9yaWFsLWZpbGVzLw==" title=\"web designer Paralax Effect\" target=\"_blank\">web designer magazine</a>.  I might modify this swf later to have youtube results and render them as planes.   If you go to seacloud9.org and look for a page that you know is not on that web server it  will serve up google results and display them in three dimensions randomly.  This page is distracting on purpose but It was kind of fun to make.  You can go to the page results by clicking on the sphere.  You can move the viewport of the search results by moving the sliders. </p>
<p>JavaScript to retrieve the url location and parse it:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #003366; font-weight: bold;">var</span> gResult<span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> gResultL<span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">function</span> getQueryString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> qString <span style="color: #339933;">=</span> window.<span style="color: #660066;">location</span><span style="color: #339933;">;</span>
    myReg  <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://seacloud9.org/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> qString.<span style="color: #660066;">href</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span>myReg<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> url<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> googleResultArray<span style="color: #009900;">&#40;</span>googleResult<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        gResult <span style="color: #339933;">=</span> googleResult<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> getGoogleTitle<span style="color: #009900;">&#40;</span>titleNum<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> gResult<span style="color: #009900;">&#91;</span>titleNum<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>ActionScript 3 Code behind for SWF all Google Search code and Debugging</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BitmapFilterQuality</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
    <span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequestMethod</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">navigateToURL</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">cameras</span>.<span style="color: #006600;">Camera3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Plane</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Sphere</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">render</span>.<span style="color: #006600;">BasicRenderEngine</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">Scene3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">Viewport3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">typography</span>.<span style="color: #006600;">Font3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">typography</span>.<span style="color: #006600;">Text3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">BitmapFileMaterial</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">special</span>.<span style="color: #006600;">Letter3DMaterial</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">typography</span>.<span style="color: #006600;">fonts</span>.<span style="color: #006600;">HelveticaBold</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">MovieMaterial</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">InteractiveScene3DEvent</span>;
    <span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">TimeType</span>;
    <span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">rhythm</span>.<span style="color: #006600;">SimpleRhythm</span>;
    <span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #006600;">SoundAnalyzer</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">lights</span>.<span style="color: #006600;">PointLight3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">shadematerials</span>.<span style="color: #006600;">CellMaterial</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>;
    <span style="color: #0066CC;">import</span> be.<span style="color: #006600;">boulevart</span>.<span style="color: #006600;">google</span>.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span>     be.<span style="color: #006600;">boulevart</span>.<span style="color: #006600;">google</span>.<span style="color: #006600;">ajaxapi</span>.<span style="color: #006600;">search</span>.<span style="color: #006600;">web</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span>     be.<span style="color: #006600;">boulevart</span>.<span style="color: #006600;">google</span>.<span style="color: #006600;">ajaxapi</span>.<span style="color: #006600;">search</span>.<span style="color: #006600;">web</span>.<span style="color: #0066CC;">data</span>.<span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">import</span>     be.<span style="color: #006600;">boulevart</span>.<span style="color: #006600;">google</span>.<span style="color: #006600;">ajaxapi</span>.<span style="color: #006600;">search</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> e404 <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> viewport:Viewport3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> scene:Scene3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:Camera3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> viewport2:Viewport3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> scene2:Scene3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> camera2:Camera3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> plane:Plane;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> plane2:Plane;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> plane3:Plane;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> sphere:Sphere;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> font3d:Font3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> text3d:Text3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> fontMat:Letter3DMaterial;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> cell:CellMaterial;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> sphereArr:<span style="color: #0066CC;">Array</span>;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> light:PointLight3D;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> renderer:BasicRenderEngine;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> renderer2:BasicRenderEngine;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> googleTitle:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> googleLink:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> googleWebSearch:GoogleWebSearch=<span style="color: #000000; font-weight: bold;">new</span> GoogleWebSearch<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> googURL:URLRequest;
&nbsp;
&nbsp;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> e404<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, e404Go <span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onWebResults<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:GoogleSearchEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> resultObject:GoogleSearchResult=<span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">data</span> as GoogleSearchResult;
            ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> ,<span style="color: #ff0000;">&quot;Estimated Number of Results: &quot;</span>+resultObject.<span style="color: #006600;">estimatedNumResults</span><span style="color: #66cc66;">&#41;</span>;
            ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> ,<span style="color: #ff0000;">&quot;Current page index: &quot;</span>+resultObject.<span style="color: #006600;">currentPageIndex</span><span style="color: #66cc66;">&#41;</span>;
            ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> ,<span style="color: #ff0000;">&quot;Number of pages: &quot;</span>+resultObject.<span style="color: #006600;">numPages</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
            <span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> result:GoogleWebItem <span style="color: #b1b100;">in</span> resultObject.<span style="color: #006600;">results</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                googleTitle.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>result.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
                googURL = <span style="color: #000000; font-weight: bold;">new</span> URLRequest <span style="color: #66cc66;">&#40;</span>result.<span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;
                googleLink.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>googURL<span style="color: #66cc66;">&#41;</span>;
                ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> ,<span style="color: #ff0000;">&quot;link:&quot;</span>+result.<span style="color: #0066CC;">url</span>+<span style="color: #ff0000;">&quot;title:&quot;</span>+result.<span style="color: #006600;">title</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;googleResultArray&quot;</span> , googleTitle <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #808080; font-style: italic;">//build 3d world now that we have our google search!</span>
            init3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            createSearch<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            addEventListeners<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onAPIError<span style="color: #66cc66;">&#40;</span>evt:GoogleAPIErrorEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;An API error has occured: &quot;</span> + evt.<span style="color: #006600;">responseDetails</span>, <span style="color: #ff0000;">&quot;responseStatus was: &quot;</span> + evt.<span style="color: #006600;">responseStatus</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> e404Go<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>,e404Go <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #808080; font-style: italic;">// Create the container Sprite</span>
            <span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span>=StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;
            <span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span>=StageAlign.<span style="color: #006600;">TOP_LEFT</span>;
            <span style="color: #808080; font-style: italic;">//this javascript function returns the query string from the window location</span>
            googleWebSearch.<span style="color: #006600;">search</span><span style="color: #66cc66;">&#40;</span>ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;getQueryString&quot;</span> <span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #ff0000;">&quot;english&quot;</span><span style="color: #66cc66;">&#41;</span>;
            googleWebSearch.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>GoogleAPIErrorEvent.<span style="color: #006600;">API_ERROR</span>,onAPIError<span style="color: #66cc66;">&#41;</span>;
            googleWebSearch.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>GoogleSearchEvent.<span style="color: #006600;">WEB_SEARCH_RESULT</span>,onWebResults<span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #808080; font-style: italic;">// VIEWPORT</span>
            viewport=<span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">true</span>,<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
            viewport2=<span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">width</span>,<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">height</span>,<span style="color: #000000; font-weight: bold;">true</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
            addChild<span style="color: #66cc66;">&#40;</span> viewport <span style="color: #66cc66;">&#41;</span>;
            addChild<span style="color: #66cc66;">&#40;</span> viewport2 <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #808080; font-style: italic;">//</span>
            <span style="color: #808080; font-style: italic;">// RENDERER</span>
            renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            renderer2 = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #808080; font-style: italic;">//</span>
            <span style="color: #808080; font-style: italic;">// SCENE</span>
            scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            scene2 = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #808080; font-style: italic;">//</span>
            <span style="color: #808080; font-style: italic;">// CAMERA</span>
            <span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span>=<span style="color: #cc66cc;">11</span>;
            <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span>=<span style="color: #cc66cc;">100</span>;
&nbsp;
            camera2 = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            camera2.<span style="color: #006600;">zoom</span>=<span style="color: #cc66cc;">11</span>;
            camera2.<span style="color: #006600;">focus</span>=<span style="color: #cc66cc;">100</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createSearch<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #808080; font-style: italic;">// Set some colors so we can see if loading is still happening,</span>
            <span style="color: #808080; font-style: italic;">// or if it failed</span>
            BitmapFileMaterial.<span style="color: #006600;">LOADING_COLOR</span>=0x000000;
            BitmapFileMaterial.<span style="color: #006600;">ERROR_COLOR</span>=0xFF0000;
            <span style="color: #808080; font-style: italic;">//</span>
            <span style="color: #000000; font-weight: bold;">var</span> material:BitmapFileMaterial=<span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;404e.png&quot;</span><span style="color: #66cc66;">&#41;</span>;
            material.<span style="color: #006600;">doubleSided</span>=<span style="color: #000000; font-weight: bold;">true</span>;
            <span style="color: #000000; font-weight: bold;">var</span> material2:BitmapFileMaterial=<span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;404e2.png&quot;</span><span style="color: #66cc66;">&#41;</span>;
            material2.<span style="color: #006600;">doubleSided</span>=<span style="color: #000000; font-weight: bold;">true</span>;
            <span style="color: #000000; font-weight: bold;">var</span> material3:ColorMaterial=<span style="color: #000000; font-weight: bold;">new</span> ColorMaterial<span style="color: #66cc66;">&#40;</span>0xFC0606,.3<span style="color: #66cc66;">&#41;</span>;
            material3.<span style="color: #006600;">doubleSided</span>=<span style="color: #000000; font-weight: bold;">true</span>;
            light=<span style="color: #000000; font-weight: bold;">new</span> PointLight3D<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
            light.<span style="color: #006600;">z</span>=<span style="color: #cc66cc;">0</span>;
            light.<span style="color: #006600;">y</span>=randomRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">280</span><span style="color: #66cc66;">&#41;</span>;
            light.<span style="color: #006600;">x</span>=randomRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">350</span>,<span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
            <span style="color: #808080; font-style: italic;">//</span>
            plane=<span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>material,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
            plane.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">350</span>;
            plane.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">265</span>;
&nbsp;
            <span style="color: #808080; font-style: italic;">// Second ViewPort objects sphere and text from google</span>
            sphereArr = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> googleTitle.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> myPattern:RegExp = <span style="color: #66cc66;">/&lt;</span>b<span style="color: #66cc66;">&gt;/</span>g;
                <span style="color: #000000; font-weight: bold;">var</span> myPattern2:RegExp = <span style="color: #66cc66;">/&lt;</span>\<span style="color: #66cc66;">/</span>b<span style="color: #66cc66;">&gt;/</span>g;
                <span style="color: #000000; font-weight: bold;">var</span> googSearch:<span style="color: #0066CC;">String</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>googleTitle<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                googSearch = googSearch.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span>myPattern, <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>;
                googSearch = googSearch.<span style="color: #006600;">replace</span><span style="color: #66cc66;">&#40;</span>myPattern2, <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>;
                sphere=<span style="color: #000000; font-weight: bold;">new</span> Sphere<span style="color: #66cc66;">&#40;</span>buildCell<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,randomRange<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>,randomRange<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span>,<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
                sphere.<span style="color: #006600;">x</span>=randomRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">500</span>,<span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;
                sphere.<span style="color: #006600;">y</span>=randomRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">500</span>,<span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;
                sphere.<span style="color: #006600;">z</span>=randomRange<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">500</span>,<span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #0066CC;">try</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> colorPoolCell:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span>0x9F3F11, 0xFC0606, 0x9FC1BE, 0x787D29, 0xE0D4BA, 0x911F15, 0xBFCDF2, 0xF0EEF1<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #000000; font-weight: bold;">var</span> colorID:<span style="color: #0066CC;">int</span> = randomRange<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">7</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;   
                fontMat = <span style="color: #000000; font-weight: bold;">new</span> Letter3DMaterial<span style="color: #66cc66;">&#40;</span>colorPoolCell<span style="color: #66cc66;">&#91;</span>colorID<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
                font3d = <span style="color: #000000; font-weight: bold;">new</span> HelveticaBold<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                text3d = <span style="color: #000000; font-weight: bold;">new</span> Text3D<span style="color: #66cc66;">&#40;</span>googSearch, font3d,  fontMat<span style="color: #66cc66;">&#41;</span>;
                text3d.<span style="color: #006600;">x</span> = sphere.<span style="color: #006600;">x</span> + googSearch.<span style="color: #0066CC;">length</span> + <span style="color: #cc66cc;">10</span>;
                text3d.<span style="color: #006600;">y</span> = sphere.<span style="color: #006600;">y</span> + <span style="color: #cc66cc;">10</span>;
                <span style="color: #808080; font-style: italic;">//text3d.z = sphere.z + 10;</span>
                sphere.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>text3d<span style="color: #66cc66;">&#41;</span>;
                sphere.<span style="color: #006600;">id</span> = i;
                scene2.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> sphere <span style="color: #66cc66;">&#41;</span>;
                sphereArr.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>sphere<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #66cc66;">&#125;</span>
                <span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                    <span style="color: #808080; font-style: italic;">// Sometimes the google title font3D will fail but we can catch it so it doesn't</span>
                    <span style="color: #808080; font-style: italic;">// have a nasty flash epic fail warning..</span>
                    ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> , <span style="color: #ff0000;">&quot;Error Reached = &quot;</span> + <span style="color: #0066CC;">e</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
            <span style="color: #66cc66;">&#125;</span>
            <span style="color: #808080; font-style: italic;">//create the 3D planes for the first ViewPort</span>
&nbsp;
            plane2=<span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>material2,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
            plane2.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">350</span>;
            plane2.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">265</span>;
            plane2.<span style="color: #006600;">z</span>=-<span style="color: #cc66cc;">60</span>;
            plane3=<span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>material3,<span style="color: #cc66cc;">800</span>,<span style="color: #cc66cc;">150</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
            plane3.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">350</span>;
            plane3.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">285</span>;
            plane3.<span style="color: #006600;">z</span>=<span style="color: #cc66cc;">80</span>;
            <span style="color: #808080; font-style: italic;">//</span>
            scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> plane <span style="color: #66cc66;">&#41;</span>;
            scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> plane2 <span style="color: #66cc66;">&#41;</span>;
            scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> plane3 <span style="color: #66cc66;">&#41;</span>;
            addListner<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">function</span> addListner<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> sphereArr.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #0066CC;">try</span><span style="color: #66cc66;">&#123;</span>
            sphereArr<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> InteractiveScene3DEvent.<span style="color: #006600;">OBJECT_PRESS</span>, callLink <span style="color: #66cc66;">&#41;</span>;
            ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> , <span style="color: #ff0000;">&quot;Event Added&quot;</span> + i<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span><span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> , <span style="color: #0066CC;">e</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">function</span> callLink<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:InteractiveScene3DEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0066CC;">try</span> <span style="color: #66cc66;">&#123;</span>
                navigateToURL<span style="color: #66cc66;">&#40;</span>googleLink<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">'_blank'</span><span style="color: #66cc66;">&#41;</span>;
                ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> , <span style="color: #ff0000;">&quot;link Clicked --&quot;</span> + <span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">id</span> + <span style="color: #ff0000;">&quot;Link Called - &quot;</span> + googleLink<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span> <span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span>err:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> , err + <span style="color: #ff0000;">&quot; id: &quot;</span> + <span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">id</span> + <span style="color: #ff0000;">&quot;Errored on: &quot;</span> + googleLink<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> buildCell<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:CellMaterial <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> colorPoolCell:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span>0x9F3F11, 0xFC0606, 0x9FC1BE, 0x787D29, 0xE0D4BA, 0x911F15, 0xBFCDF2, 0xF0EEF1<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000000; font-weight: bold;">var</span> colorID:<span style="color: #0066CC;">int</span> = randomRange<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">7</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000000; font-weight: bold;">var</span> colorID2:<span style="color: #0066CC;">int</span> = randomRange<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">7</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #808080; font-style: italic;">//random color material generation returns cellMaterial</span>
            <span style="color: #808080; font-style: italic;">//cell=new CellMaterial(light,Math.round(Math.random()*0xFFFFFF),Math.round(Math.random()*0xFFFFFF),100);</span>
            cell=<span style="color: #000000; font-weight: bold;">new</span> CellMaterial<span style="color: #66cc66;">&#40;</span>light,colorPoolCell<span style="color: #66cc66;">&#91;</span>colorID<span style="color: #66cc66;">&#93;</span>,colorPoolCell<span style="color: #66cc66;">&#91;</span>colorID2<span style="color: #66cc66;">&#93;</span>,<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
            cell.<span style="color: #006600;">interactive</span>=<span style="color: #000000; font-weight: bold;">true</span>;
            <span style="color: #b1b100;">return</span> cell;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> randomRange<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">max</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">min</span>:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">max</span> - <span style="color: #0066CC;">min</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #0066CC;">min</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addEventListeners<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, __onEnterFrame <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> removeEventListeners<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            removeEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, __onEnterFrame <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">/*===================================================================\\
        ||Listener Functions ||
        \\===================================================================*/</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> __onEnterFrame<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">e</span>:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #808080; font-style: italic;">//moves the error planes viewort according to mouse position</span>
            plane.<span style="color: #006600;">rotationY</span>=viewport.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            plane.<span style="color: #006600;">rotationX</span>=viewport.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            plane2.<span style="color: #006600;">rotationY</span>=viewport.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            plane2.<span style="color: #006600;">rotationX</span>=viewport.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            plane3.<span style="color: #006600;">rotationY</span>=viewport.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            plane3.<span style="color: #006600;">rotationX</span>=viewport.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            light.<span style="color: #006600;">rotationX</span>=viewport2.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            light.<span style="color: #006600;">rotationY</span>=viewport2.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
            <span style="color: #808080; font-style: italic;">//</span>
            sldWorld.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;change&quot;</span>, updateWorldAxisValue<span style="color: #66cc66;">&#41;</span>;
            sldZoomCam.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;change&quot;</span>, updateCamerValue<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">this</span>.<span style="color: #006600;">setChildIndex</span><span style="color: #66cc66;">&#40;</span>sldWorld, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">numChildren</span>-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">this</span>.<span style="color: #006600;">setChildIndex</span><span style="color: #66cc66;">&#40;</span>sldZoomCam, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">numChildren</span>-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
            renderer.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span> scene, <span style="color: #0066CC;">camera</span>, viewport <span style="color: #66cc66;">&#41;</span>;
            renderer2.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span> scene2, camera2, viewport2 <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> updateWorldAxisValue<span style="color: #66cc66;">&#40;</span>argument<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> sldWorld_value:<span style="color: #0066CC;">Number</span>=<span style="color: #0066CC;">this</span>.<span style="color: #006600;">sldWorld</span>.<span style="color: #006600;">value</span>;
            camera2.<span style="color: #006600;">rotationY</span>=sldWorld_value;
&nbsp;
&nbsp;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">function</span> updateCamerValue<span style="color: #66cc66;">&#40;</span>argument<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> sldZoomCam_value:<span style="color: #0066CC;">Number</span>=<span style="color: #0066CC;">this</span>.<span style="color: #006600;">sldZoomCam</span>.<span style="color: #006600;">value</span>;
            camera2.<span style="color: #006600;">zoom</span>=sldZoomCam_value;
&nbsp;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>ActionScript3 Timeline Code for Sound Analysis and Image Effects</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">FunctionTracker</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">Oscillator</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">ColorPool</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">layout</span>.<span style="color: #006600;">GridLayout</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapCanvas</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #006600;">SoundAnalyzer</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">FixedVibration</span>;
<span style="color: #000000; font-weight: bold;">var</span> myWidth = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>;
<span style="color: #000000; font-weight: bold;">var</span> myHeight = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> clipCanvas:BitmapCanvas = <span style="color: #000000; font-weight: bold;">new</span> BitmapCanvas<span style="color: #66cc66;">&#40;</span>myWidth, myHeight<span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>clipCanvas<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> clipContainer:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> soundAnalyzer:SoundAnalyzer = <span style="color: #000000; font-weight: bold;">new</span> SoundAnalyzer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
soundAnalyzer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> colorPool:ColorPool = <span style="color: #000000; font-weight: bold;">new</span> ColorPool<span style="color: #66cc66;">&#40;</span>
    0x9F3F11, 0xFC0606, 0x9FC1BE, 0x787D29, 0xE0D4BA, 0x911F15, 0xBFCDF2, 0xF0EEF1
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// xStart, yStart, xSpacing, ySpacing, columns</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> layout:GridLayout = <span style="color: #000000; font-weight: bold;">new</span> GridLayout<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, myHeight <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">34</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> numItems:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">64</span>;
<span style="color: #000000; font-weight: bold;">var</span> freq:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">120</span>;
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> numItems; ++i<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> clip:MySquare = <span style="color: #000000; font-weight: bold;">new</span> MySquare<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    layout.<span style="color: #006600;">applyLayout</span><span style="color: #66cc66;">&#40;</span>clip<span style="color: #66cc66;">&#41;</span>;
    colorPool.<span style="color: #006600;">colorChildren</span><span style="color: #66cc66;">&#40;</span>clip<span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #808080; font-style: italic;">// object, property, soundAnalyzer.getFrequencyRange, [startRange, endRange, min, max]</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> aTracker:FunctionTracker = <span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>clip.<span style="color: #006600;">myFill</span>, <span style="color: #ff0000;">&quot;alpha&quot;</span>, soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>, <span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>, i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>+<span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0.25</span>, <span style="color: #cc66cc;">1.0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #000000; font-weight: bold;">var</span> sTracker:FunctionTracker = <span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>clip.<span style="color: #006600;">myFill</span>, <span style="color: #ff0000;">&quot;scaleY&quot;</span>, soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>, <span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>, i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>+<span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0.5</span>, <span style="color: #cc66cc;">30.0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
    aTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    sTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #808080; font-style: italic;">// target Object, property, waveFunction, frequency, min, max, start value</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">var</span> yOsc:Oscillator = <span style="color: #000000; font-weight: bold;">new</span> Oscillator<span style="color: #66cc66;">&#40;</span>clip, <span style="color: #ff0000;">&quot;y&quot;</span>, Oscillator.<span style="color: #006600;">sineWave</span>, freq, <span style="color: #cc66cc;">60</span>, <span style="color: #cc66cc;">600</span>, i<span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;   
    yOsc.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    clipContainer.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>clip<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
clipCanvas.<span style="color: #006600;">startCapture</span><span style="color: #66cc66;">&#40;</span>clipContainer, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">sound</span>:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Sound</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://i-create.org/actionscript/404e/shortCircuitE1.mp3&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> aVibration:FixedVibration = <span style="color: #000000; font-weight: bold;">new</span> FixedVibration<span style="color: #66cc66;">&#40;</span>cBagHead, <span style="color: #ff0000;">&quot;alpha&quot;</span>, <span style="color: #cc66cc;">0.9</span>, <span style="color: #cc66cc;">0.1</span>, <span style="color: #cc66cc;">0.0</span>, <span style="color: #cc66cc;">1.0</span>, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
aVibration.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>You find working examples of this 404 error page working at the following location:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NlYWNsb3VkOS5vcmcvcHJvY2Vzc2luZy5vcmc=" title=\"404 Error\" target=\"_blank\">http://seacloud9.org/Processing.org</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NlYWNsb3VkOS5vcmcvQ29udGV4dCBGcmVlIEFydA==" title=\"404 Error\" target=\"_blank\">http://seacloud9.org/Context Free Art</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NlYWNsb3VkOS5vcmcvR2VuZXJhdGl2ZSBBcnQ=" title=\"404 Error\" target=\"_blank\">http://seacloud9.org/Generative Art</a></p>
<p>A few articles that are good reads:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3RoZWZsYXNoYmxvZy5jb20vP3A9MTc0Mw==" title =\"Web development will become much more complicated\" target=\"_blank\">Web development will become much more complicated </a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy50ZWNoY3J1bmNoLmNvbS8yMDEwLzAyLzA1L3RoZS1mdXR1cmUtb2Ytd2ViLWNvbnRlbnQtaHRtbDUtZmxhc2gtbW9iaWxlLWFwcHMv" title =\"The Future of Web Content\" target=\"_blank\">The Future of Web Content</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=761" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F02%2F07%2F404-errors-hyped-with-papervision3d-pt-2%2F&amp;linkname=404%20Errors%20Hyped%20With%20PaperVision3d%20pt.%202"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/02/07/404-errors-hyped-with-papervision3d-pt-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://i-create.org/actionscript/404e/shortCircuitE1.mp3" length="157078" type="audio/mpeg" />
		</item>
		<item>
		<title>The Evolutionary iPad</title>
		<link>http://i-create.org/2010/01/29/the-evolutionary-ipad/</link>
		<comments>http://i-create.org/2010/01/29/the-evolutionary-ipad/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 06:50:06 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple I]]></category>
		<category><![CDATA[Apple Inc.]]></category>
		<category><![CDATA[IPod]]></category>
		<category><![CDATA[ITunes]]></category>
		<category><![CDATA[Steve Jobs]]></category>
		<category><![CDATA[Technology/Internet]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=755</guid>
		<description><![CDATA[What is my opinion?  It&#8217;s awesome I will definitely get one.  I also think it presents a unique opportunity for Google and others to create competing products.   The iPad is essentially a big iPod touch.  So whats the big deal?  Well more cool apps that have yet to be developed.  More useful applications for email, [...]]]></description>
			<content:encoded><![CDATA[<p>What is my opinion?  It&#8217;s awesome I will definitely get one.  I also think it presents a unique opportunity for Google and others to create competing products.   The iPad is essentially a big iPod touch.  So whats the big deal?  Well more cool apps that have yet to be developed.  More useful applications for email, note taking, and wordpress etc.  I could see this device being very useful for consumers and I am not saying Apple is the only one capable of creating a revolutionary change.  They do happen to be the most tactful, creative, and divisive competition though.   I personally would like to have all my books on such a devices why?  I don&#8217;t know probably; because I imagine writing notes on virtual pages is less destructive then writing notes on the sides of pages, I pay for I also would like to be able to search all my reference books quickly simultaneously.  I am also confident that the user interface will be easy to utilize.  I also think it will be highly useful in educational settings.  I would think this would be a very handy device for college students.  I can also see people creating all sorts of new educational content for kids on it.  It seems to me that Macromedia (Adobe) Director and Flash used to own this niche market. </p>
<p><object width="325" height="244"><param name="movie" value="http://www.youtube.com/v/poaUbmdUcCY&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/poaUbmdUcCY&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="325" height="244"></embed></object></p>
<p>I would also like to point out it is still a very much so walled garden (the size just got larger).  Why are their no competing browsers on the iPod platform, Android has them, why no flash, still 1ghz of speed and no flash?  I think the dominance of the Apple makes it hard to compete iTunes has weight behind it.  This will enable writes, artist everyone really to display their work to a community that can purchase their work easily.  I think both Google and Microsoft can learn from Apples innovative interfaces (Not to say Microsoft hasn&#8217;t done a great job with Surface).  I am looking forward to developing for it and on the apple platform.  I am also anxious to see FlashCS5 this will also ensure a boom for the app store.  With the apple bookstore also comes lock in fear as if iTunes wasn&#8217;t enough for music.  This could very well be the death kneel for bookstores lets at least hope it angers Amazon enough to utilize Android to create a competing product.  I am also hopeful to hear about Windows Mobile 7 I think it will be awesome to develop mobile applications with Silverlight, Microsoft is in need of a comeback.  I think windows 7 will also be on a variety of devices, tablets, etc..  </p>
<p>The iPad is evolutionary but not necessarily revolutionary in my opinion.  </p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=755" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F01%2F29%2Fthe-evolutionary-ipad%2F&amp;linkname=The%20Evolutionary%20iPad"><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/01/29/the-evolutionary-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reloaded..</title>
		<link>http://i-create.org/2010/01/29/reloaded/</link>
		<comments>http://i-create.org/2010/01/29/reloaded/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 05:56:09 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[i-create]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Internet Explorer 6]]></category>
		<category><![CDATA[Panoramic]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[Smartphones]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=734</guid>
		<description><![CDATA[Quick Tip: Utilize Firebug with ActionScript to trace out tough Bugs Add the import statment at the Top and then call it anywhere Handy:) Note I was having troubles getting it to work with Firebug 1.5 but on Firebug 1.4.5 works like a charm! import flash.external.ExternalInterface; ExternalInterface.call&#40; &#34;console.log&#34; , &#34;Omaha Winter. Camera Z:&#34; + cam.z&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Quick Tip:</strong></p>
<p>Utilize Firebug with ActionScript to trace out tough Bugs<br />
Add the import statment at the Top and then call it anywhere Handy:)  Note I was having troubles getting it to work with Firebug 1.5 but on <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cHM6Ly9hZGRvbnMubW96aWxsYS5vcmcvZW4tVVMvZmlyZWZveC9hZGRvbnMvdmVyc2lvbnMvMTg0Mw==" target=\"_blank\" title=\"firebug version history\">Firebug 1.4.5</a> works like a charm!</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">external</span>.<span style="color: #006600;">ExternalInterface</span>; 
ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;console.log&quot;</span> , <span style="color: #ff0000;">&quot;Omaha Winter. Camera Z:&quot;</span> + cam.<span style="color: #006600;">z</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The example below will show it in action if you have Firebug 1.4.5 I will print out a message.  This example was built off of <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2F3YXkzZC5jb20v" target=\"_blank\" title=\"Away3d\">Away3d</a> use your arrow keys to move and your &#8220;w&#8221; and &#8220;s&#8221; key to zoom.<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5mcmllbmRzb2ZlZC5jb20vYm9vay5odG1sP2lzYm49OTc4MTQzMDIyNTQxNg==" title=\"The Essential Guide to 3D in Flash\" target=\"_blank\">  On a side note &#8211; I am looking forward to reading the Essential Guide to 3D in flash it goes over the Away3D engine indepth</a></p>
<p><a class=\"thickbox\" title=\"Omaha Winter Panoramic Use Arrow Keys to Move\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9PbWFoYVdpbnRlclBhbm9yYW1pYy9PbWFoYVdpbnRlci5odG1sP0tlZXBUaGlzPXRydWUmYW1wOz9UQl9pZnJhbWU9dHJ1ZSZhbXA7aGVpZ2h0PTM5MCZhbXA7d2lkdGg9NDc1"><img src="http://i-create.org/OmahaWinterPanoramic/OmahaWinter.png" title="Omaha Winter Panoramic"/></a></p>
<p>Reloaded</p>
<p>I have been making style changes and I am not done with making those changes; I am just glad the old version is gone for good!  I have been very busy at work and working on several other websites simultaneously.  I have been working on my wordpress blog lately and rearranged some things.  First of all this blog will NO LONGER Supports IE6 on purpose!  I personally have a great disdain for IE6 and I don&#8217;t want to spend my free time programming for it unless it is absolutely required.  In short this browser is no longer supported and this is for many reasons so many that I can&#8217;t post them all here.  So if your using IE6 or lower please upgrade and you might even want to try something new like Chrome or Firefox both of these browsers in my opinion are better suited for the web.  I really just wanted to make my blog brighter and more easily read.  I also need to make the loading a little more graceful I just simply haven&#8217;t had the time yet.  I guess, I will just apply agile and continually improve it:)</p>
<p>I will be updating my 404 Error tutorials soon maybe even this weekend if I get ahead.  I have been spending my time working on redoing my interactive portfolio.  I have also been experimenting with <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2FuZHJvaWQucHJvY2Vzc2luZy5vcmcv" target=\"_blank\" title=\"Processing for Google Android\">Processing on Android</a> and my initial reaction to programming with Processing and Android in my opinion have been very positive.  I have a couple of books that I have been reading and I might put together a video tutorial of my new apps I have been working on.  I am also really looking forward to Verizon updating to Android 2.1!  Processing / Android kit targets 2.0 and higher.   I think Android has lots of potential for developers in my opinion it is an excellent time to be a developer things are really booming and changing in the tech industry and they will trickle down to everyday life and really change the way people go about everyday tasks. </p>
<p>Reading lately:<br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5mcmllbmRzb2ZlZC5jb20vYm9vay5odG1sP2lzYm49OTc4MTQzMDIxOTc5OA==" title=\"The Essential Guide to Processing for the Flash Developer\" target=\"_blank\">The Essential Guide to Processing for the Flash Developer</a><br />
<a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5mbGFzaG1hZ2F6aW5lLmNvbS9UdXRvcmlhbHMvY2F0ZWdvcnkvYXdheTNkLw==" title=\"Tutorial on Away3D\" target=\"_blank\">Tutorial on Away3D</a></p>
 <img src="http://i-create.org/wp-content/plugins/feed-statistics.php?view=1&post_id=734" width="1" height="1" style="display: none;" /><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fi-create.org%2F2010%2F01%2F29%2Freloaded%2F&amp;linkname=Reloaded.."><img src="http://i-create.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://i-create.org/2010/01/29/reloaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>404 Errors Hyped With PaperVision3d</title>
		<link>http://i-create.org/2009/12/20/404-errors-hyped-with-papervision3d/</link>
		<comments>http://i-create.org/2009/12/20/404-errors-hyped-with-papervision3d/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 06:12:57 +0000</pubDate>
		<dc:creator>Brendon Smith</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[Joshua Davis]]></category>
		<category><![CDATA[PaperVision3D]]></category>

		<guid isPermaLink="false">http://i-create.org/?p=725</guid>
		<description><![CDATA[404 Error Pages don&#8217;t have to be boring. Especially if you develop rich internet applications and have access to awesome tools like PaperVision3d and Hype! This is a two part example. This example just shows you simple code to create a planes in PaperVision3d make them follow your mouse. I also used SoundSnap to snag [...]]]></description>
			<content:encoded><![CDATA[<p>404 Error Pages don&#8217;t have to be boring.  Especially if you develop rich internet applications and have access to awesome tools like <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2cucGFwZXJ2aXNpb24zZC5jb20=" target=\"_blank\" title=\"PaperVision3d\">PaperVision3d</a> and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2h5cGUuam9zaHVhZGF2aXMuY29tLw==" target=\"_blank\" title=\"Hype\">Hype</a>!  This is a two part example.  This example just shows you simple code to create a planes in <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2Jsb2cucGFwZXJ2aXNpb24zZC5jb20=" target=\"_blank\" title=\"PaperVision3d\">PaperVision3d</a> make them follow your mouse.  I also used <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5zb3VuZHNuYXAuY29tLw==" target=\"_blank\" title=\"Sound Snap\">SoundSnap</a> to snag some short-circuit static for background noise.  I also used Hype to analyze the sound this is literally an out of the box example of Hype.  What is hype?  Hype is a new framework for quickly putting together highly interactive eye-candy.  Hype was created by <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2pvc2h1YWRhdmlzLmNvbS8=" target=\"_blank\" title=\"Joshua Davis\">Joshua Davis</a> and <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hdXRvbWF0YXN0dWRpb3MuY29tLw==" target=\"_blank\" title=\"Brendan Hall\">Brendan Hall</a>.  It has special methods like Color Pool, Grids, Vibrations Effects, Sound Analysis, just to name a few in short its wicked cool.  I am looking forward to playing around with it more it&#8217;s just a matter of finding the time.  This was just something I was thinking about placing on my new interactive portfolio.  I am going to create a 404 page that utilizes these libraries.  This part only shows you the audio analysis(please note the analysis will fail if you are playing youtube or something else in another window), papervision3d plane code, and vibration effect applied to a movie.  In part two I will add a parallax effect to give this error page more depth.  Mash it with a search that pulls results from i-create (I will pull the URL from the browser with JavaScript) and also has hidden gems in it.  I will hope to really dig into hype more.  Sometimes it can be fun to make websites that are distracting on purpose read like a choose your own adventure album.  I can show an example like this and now show you one of my favorite sites.  You have to go out and check out <a href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3d3dy5hYm5vcm1hbGJlaGF2aW9yY2hpbGQuY29tLw==" target=\"_blank\" title=\"Abnormal Behavior Child\">ABC (Abnormal Behavior Child)</a> I think he originally made this style and his site is setup more like a personal odyssey.</p>
<p><a class=\"thickbox\" title=\"Fun with Hype and PaperVision3d\" href="http://i-create.org/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2ktY3JlYXRlLm9yZy9hY3Rpb25zY3JpcHQvNDA0ZS80MDRlLmh0bWw/S2VlcFRoaXM9dHJ1ZSZhbXA7P1RCX2lmcmFtZT10cnVlJmFtcDtoZWlnaHQ9NjUwJmFtcDt3aWR0aD05MDA="><img width="325px" src="http://i-create.org/actionscript/404e/404eStill.png" alt="404e"/></a></p>
<p>Code for the Class Code Behind:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BitmapFilterQuality</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">cameras</span>.<span style="color: #006600;">Camera3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Plane</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">render</span>.<span style="color: #006600;">BasicRenderEngine</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">Scene3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">Viewport3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">BitmapFileMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">MovieMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">TimeType</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">rhythm</span>.<span style="color: #006600;">SimpleRhythm</span>;
	<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #006600;">SoundAnalyzer</span>;
&nbsp;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> e404 <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> viewport:Viewport3D;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> scene:Scene3D;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:Camera3D;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> plane :Plane;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> plane2 :Plane;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> plane3 :Plane;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> renderer:BasicRenderEngine;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> e404<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, e404Go <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> e404Go<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>,e404Go <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Create the container Sprite</span>
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span>=StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span>=StageAlign.<span style="color: #006600;">TOP_LEFT</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			init3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			createPlane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addEventListeners<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// VIEWPORT</span>
			viewport=<span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #000000; font-weight: bold;">true</span>,<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span> viewport <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			<span style="color: #808080; font-style: italic;">// RENDERER</span>
			renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			<span style="color: #808080; font-style: italic;">// SCENE</span>
			scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			<span style="color: #808080; font-style: italic;">// CAMERA</span>
			<span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span>=<span style="color: #cc66cc;">11</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span>=<span style="color: #cc66cc;">100</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createPlane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			BitmapFileMaterial.<span style="color: #006600;">LOADING_COLOR</span>=0x000000;
			BitmapFileMaterial.<span style="color: #006600;">ERROR_COLOR</span>=0xFF0000;
			<span style="color: #808080; font-style: italic;">//</span>
			<span style="color: #000000; font-weight: bold;">var</span> material:BitmapFileMaterial=<span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;404e.png&quot;</span><span style="color: #66cc66;">&#41;</span>;
			material.<span style="color: #006600;">doubleSided</span>=<span style="color: #000000; font-weight: bold;">true</span>;
			<span style="color: #000000; font-weight: bold;">var</span> material2:BitmapFileMaterial=<span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;404e2.png&quot;</span><span style="color: #66cc66;">&#41;</span>;
			material2.<span style="color: #006600;">doubleSided</span>=<span style="color: #000000; font-weight: bold;">true</span>;
			<span style="color: #000000; font-weight: bold;">var</span> material3:ColorMaterial=<span style="color: #000000; font-weight: bold;">new</span> ColorMaterial<span style="color: #66cc66;">&#40;</span>0xFC0606,.6<span style="color: #66cc66;">&#41;</span>;
			material3.<span style="color: #006600;">doubleSided</span>=<span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//</span>
			plane=<span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>material,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
			plane.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">350</span>;
			plane.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">265</span>;
&nbsp;
			plane2=<span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>material2,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
			plane2.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">350</span>;
			plane2.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">265</span>;
			plane2.<span style="color: #006600;">z</span>=-<span style="color: #cc66cc;">60</span>;
&nbsp;
			plane3=<span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>material3,<span style="color: #cc66cc;">800</span>,<span style="color: #cc66cc;">150</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
			plane3.<span style="color: #006600;">x</span>=-<span style="color: #cc66cc;">350</span>;
			plane3.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;">285</span>;
			plane3.<span style="color: #006600;">z</span>=<span style="color: #cc66cc;">80</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> plane <span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> plane2 <span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> plane3 <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addEventListeners<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, __onEnterFrame <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> removeEventListeners<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			removeEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, __onEnterFrame <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> __onEnterFrame<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">e</span>:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			plane.<span style="color: #006600;">rotationY</span>=viewport.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
			plane.<span style="color: #006600;">rotationX</span>=viewport.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
			plane2.<span style="color: #006600;">rotationY</span>=viewport.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
			plane2.<span style="color: #006600;">rotationX</span>=viewport.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
			plane3.<span style="color: #006600;">rotationY</span>=viewport.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
			plane3.<span style="color: #006600;">rotationX</span>=viewport.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			renderer.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span> scene, <span style="color: #0066CC;">camera</span>, viewport <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Below are the actions that are applied to the time-line with in the Movie</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">FunctionTracker</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">Oscillator</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #0066CC;">color</span>.<span style="color: #006600;">ColorPool</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">layout</span>.<span style="color: #006600;">GridLayout</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapCanvas</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">framework</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #006600;">SoundAnalyzer</span>;
<span style="color: #0066CC;">import</span> hype.<span style="color: #006600;">extended</span>.<span style="color: #006600;">behavior</span>.<span style="color: #006600;">FixedVibration</span>;
<span style="color: #000000; font-weight: bold;">var</span> myWidth = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>;
<span style="color: #000000; font-weight: bold;">var</span> myHeight = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> clipCanvas:BitmapCanvas = <span style="color: #000000; font-weight: bold;">new</span> BitmapCanvas<span style="color: #66cc66;">&#40;</span>myWidth, myHeight<span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>clipCanvas<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> clipContainer:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> soundAnalyzer:SoundAnalyzer = <span style="color: #000000; font-weight: bold;">new</span> SoundAnalyzer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
soundAnalyzer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> colorPool:ColorPool = <span style="color: #000000; font-weight: bold;">new</span> ColorPool<span style="color: #66cc66;">&#40;</span>
	0x9F3F11, 0xFC0606, 0x9FC1BE, 0x787D29, 0xE0D4BA, 0x911F15, 0xBFCDF2, 0xF0EEF1
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// xStart, yStart, xSpacing, ySpacing, columns</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> layout:GridLayout = <span style="color: #000000; font-weight: bold;">new</span> GridLayout<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, myHeight <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">34</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> numItems:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">64</span>;
<span style="color: #000000; font-weight: bold;">var</span> freq:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">120</span>;
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> numItems; ++i<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> clip:MySquare = <span style="color: #000000; font-weight: bold;">new</span> MySquare<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	layout.<span style="color: #006600;">applyLayout</span><span style="color: #66cc66;">&#40;</span>clip<span style="color: #66cc66;">&#41;</span>;
	colorPool.<span style="color: #006600;">colorChildren</span><span style="color: #66cc66;">&#40;</span>clip<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">// object, property, soundAnalyzer.getFrequencyRange, [startRange, endRange, min, max]</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> aTracker:FunctionTracker = <span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>clip.<span style="color: #006600;">myFill</span>, <span style="color: #ff0000;">&quot;alpha&quot;</span>, soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>, <span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>, i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>+<span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0.25</span>, <span style="color: #cc66cc;">1.0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> sTracker:FunctionTracker = <span style="color: #000000; font-weight: bold;">new</span> FunctionTracker<span style="color: #66cc66;">&#40;</span>clip.<span style="color: #006600;">myFill</span>, <span style="color: #ff0000;">&quot;scaleY&quot;</span>, soundAnalyzer.<span style="color: #006600;">getFrequencyRange</span>, <span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>, i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">4</span>+<span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0.5</span>, <span style="color: #cc66cc;">30.0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	aTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	sTracker.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">// target Object, property, waveFunction, frequency, min, max, start value</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> yOsc:Oscillator = <span style="color: #000000; font-weight: bold;">new</span> Oscillator<span style="color: #66cc66;">&#40;</span>clip, <span style="color: #ff0000;">&quot;y&quot;</span>, Oscillator.<span style="color: #006600;">sineWave</span>, freq, <span style="color: #cc66cc;">60</span>, <span style="color: #cc66cc;">600</span>, i<span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="c