<?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>HODGEDEV FLASH BLOG</title>
	<atom:link href="http://blog.hodgedev.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.hodgedev.com</link>
	<description>All things flash</description>
	<lastBuildDate>Tue, 02 Feb 2010 13:53:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AS3 Drupal Services Framework</title>
		<link>http://blog.hodgedev.com/?p=98</link>
		<comments>http://blog.hodgedev.com/?p=98#comments</comments>
		<pubDate>Tue, 02 Feb 2010 13:53:21 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=98</guid>
		<description><![CDATA[I have been working on a framework to ease the communication between flash and drupals services module via AMFPHP.
Click here to head to the google repository
You will require an SVN client to retrieve the current versions of the individual classes.
The workflow is rather simple,
First you require the Services class, which is built around the Singleton [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a framework to ease the communication between flash and drupals services module via AMFPHP.</p>
<p><a href="https://code.google.com/p/as3drupalservices/">Click here to head to the google repository</a><br />
You will require an SVN client to retrieve the current versions of the individual classes.</p>
<p>The workflow is rather simple,</p>
<p>First you require the Services class, which is built around the Singleton Design pattern and cannot be instantiated directly.  Please use the getInstance() method.</p>
<p>Once you have a reference to the SINGLE Services class instance and have set the gateway property, you may then use the public connect() method, which utilizes the System class to connect and disconnect from the database.</p>
<p>The Services instance maintains/holds a valid session id, and NetConnection instance, which are both required by all Service Classes.</p>
<p>The Service class is an Abstract class and is not intended to be instantiated, but extended by the various service classes, such as Node.as.</p>
<p>if you wanted node data, you merely import the Node class, instanstiate a node object passing THE Service object to it and then call getData() on the node object.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=98</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photo Shoot Builder v0.2.3a</title>
		<link>http://blog.hodgedev.com/?p=92</link>
		<comments>http://blog.hodgedev.com/?p=92#comments</comments>
		<pubDate>Thu, 27 Aug 2009 18:20:11 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Flex SDK]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=92</guid>
		<description><![CDATA[
I haven&#8217;t blogged in some time because many things have been going on.  I am no longer working at Streetwise and I am freelancing at home.  So far the journey has been pleasant.  I now have much more time to work on personal projects and once such project is Photo Shoot Builder. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dev.hodgedev.com/psbuilder "><img src="http://www.hodgedev.com/blog/images/psb.jpg" alt="Photo Shoot Builder v0.2.3a" /></a></p>
<p>I haven&#8217;t blogged in some time because many things have been going on.  I am no longer working at Streetwise and I am freelancing at home.  So far the journey has been pleasant.  I now have much more time to work on personal projects and once such project is Photo Shoot Builder.  PSB is still alpha quality, but we will be going beta with is soon.</p>
<p>Bram Timmer, a long time friend and very strong designer/photographer, suggested that photographers needed a more elegant method of creating these set lists.  Bram soon handed off the creative to me in the form of a PSD, as we usually do, and after a lot of cutting, codeing and compiling, we find ourselves at v0.2.3.   Click the link below.</p>
<p>Photo Shoot Builder is merely a drag and drop enabled tool for building a typical set diagram that is rather common in photography.  It utilizes many different design patterns, all within context, and the site is very extensible, easy to update, and performs very well.  When the end-user is ready, he or she may choose to save as jpg or png.  We are close to enabling the Flickr upload mechanism as well.  Go play with the application, but remember it isn&#8217;t even beta yet.  If you are going to leave feedback, please be constructive.</p>
<p><a href="http://dev.hodgedev.com/psbuilder ">Click here to use Photo Shoot Builder v0.2.3a</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash CS4 3D: A little confusing when using a DocumentClass?</title>
		<link>http://blog.hodgedev.com/?p=89</link>
		<comments>http://blog.hodgedev.com/?p=89#comments</comments>
		<pubDate>Sat, 11 Apr 2009 08:21:16 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[CS4]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Actionscript3 CS4 FlashDevelop]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=89</guid>
		<description><![CDATA[I have a client that needs some simple 3D.  Since I am allowed to develop the project for Flash Player 10, and my 3D needs were simplistic, I chose not to use Papervision3D.  I began things like normal.  I opened FlashDevelop3 and created a project.  Then, I opened Flash CS4 and [...]]]></description>
			<content:encoded><![CDATA[<p>I have a client that needs some simple 3D.  Since I am allowed to develop the project for Flash Player 10, and my 3D needs were simplistic, I chose not to use Papervision3D.  I began things like normal.  I opened FlashDevelop3 and created a project.  Then, I opened Flash CS4 and created a rectangle.  With a mock-up of the final product in the background, I began to rotate the rectangle in 3D space; until it matched the comp.  When I was happy, I tested the movie, and sure enough everything looked great.</p>
<p>After getting my creative into its proper position and perspective, I moved on to link the DocumentClass that FlashDevelop3 created when I created my project, to the newly created flash file.  As soon as I entered the document class, I tested the movie.  My rectangle no longer had perspective and was only barely visible on screen.  I removed the document class and all the sudden my rotation values were back.</p>
<p>I began to scour google for answers and eventually found some on adobe&#8217;s site.  What what said on adobe&#8217;s site was to set the following in your class.</p>
<p>    //&#8221;this&#8221; applies to my DocumentClass<br />
    this.transform.perspectiveProjection.projectionCenter = new Point(someNumber,someNumber);<br />
    this.transform.perspectiveProjection.fieldOfView = someInt;</p>
<p>Having this information, I quickly entered in and tested my movie.  I was a bit saddened to see that nothing had changed.  I sat for a moment and thought about it.  If the values for projectionCenter and fieldOfView must be set if using a document class, then it is possible that any rotation on the X, Y, or Z, in the Flash IDE may have been ignored.  I quickly set rotation values with actionscript and tested the movie.  EUREKA!  It works.</p>
<p>Hopefully this little tid-bit of information can save you from the aggravation I went through <img src='http://blog.hodgedev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=89</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 04: How to create an AIR application.</title>
		<link>http://blog.hodgedev.com/?p=81</link>
		<comments>http://blog.hodgedev.com/?p=81#comments</comments>
		<pubDate>Tue, 07 Apr 2009 07:57:21 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIR SDK]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Flex SDK]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=81</guid>
		<description><![CDATA[Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 04: How to create an AIR application.
This short video shows you how to create an AIR project. 
First, the Descriptor file (setting the namespace to 1.5) and changing any other settings you wish.
Second, edit the CreateCertificate.bat and create a certificate.
Third, edit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hodgedev.com/tutorials/flashdevelop/fd3_part04/">Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 04: How to create an AIR application.</a></p>
<p>This short video shows you how to create an AIR project. </p>
<p>First, the Descriptor file (setting the namespace to 1.5) and changing any other settings you wish.<br />
Second, edit the CreateCertificate.bat and create a certificate.<br />
Third, edit the PackageApplication.bat, compile your application to create a swf, then run PackageApplication.bat, provide the password set in CreateCertificate.bat and the AIR application is created in the air folder.</p>
<p>Stay tuned for a run-through of the AIR Update Framework, which allows users to check for updates which is dictated by a UpdateDescriptor file on your server somewhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CachedSharedObject Class, A Local Shared Object that clears with the browser cache.</title>
		<link>http://blog.hodgedev.com/?p=69</link>
		<comments>http://blog.hodgedev.com/?p=69#comments</comments>
		<pubDate>Wed, 01 Apr 2009 08:57:09 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[AS3 Actionscript3 SharedObject]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=69</guid>
		<description><![CDATA[DEMO: http://dev.hodgedev.com/DeSOL_testing/
Note:  This is not intended as a replacement for SharedObject. Obviously if you still require some level of persistence you could just use the native SharedObject; However, if you require the use of a SharedObject and would like it to clear with the browser cache, or by a certain date, this class can [...]]]></description>
			<content:encoded><![CDATA[<p>DEMO: <a href="http://dev.hodgedev.com/DeSOL_testing/">http://dev.hodgedev.com/DeSOL_testing/</a></p>
<p>Note:  This is not intended as a replacement for SharedObject. Obviously if you still require some level of persistence you could just use the native SharedObject; However, if you require the use of a SharedObject and would like it to clear with the browser cache, or by a certain date, this class can help you.</p>
<p>The class works by creating a cookie when the shared object is created; This is done with the help of the ExternalInterface Class in the flash.external Package which makes a call to a javascript function.</p>
<p>From the point of creation, the SharedObjects lifespan is directly related to that of the Cookie&#8217;s life span.  The two share the same name, and upon load of the page a function is called to check if a particular cookie exists.  The cookie acts as a reference for the SharedObject.  If the cookie is removed, meaning the cache has been cleared, the next page load checks the cookie, finds that it does not exists, and clears the SharedObject that has the same name.</p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax1"></a><a style="wp-synhighlighter-title" href="#codesyntax1"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript3" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">//The AS3 Class</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #9900cc; font-weight: bold;">package</span> com.hodgedev.desol.net</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.external</span>.<a href="http://www.google.com/search?q=externalinterface%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:externalinterface.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ExternalInterface</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<a href="http://www.google.com/search?q=sharedobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sharedobject.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">SharedObject</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<a href="http://www.google.com/search?q=sharedobjectflushstatus%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sharedobjectflushstatus.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">SharedObjectFlushStatus</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">	 * &amp;#8230;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">	 * @author Brian Hodge (brian@hodgedev.com)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">	 */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> CachedSharedObject extends <a href="http://www.google.com/search?q=sharedobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sharedobject.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">SharedObject</span></a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * creates a cookie via ExternalInterface and a call to a</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * javascript function which is expecting three things:</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * a name, a value, how many days until expiration.  A</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * SharedObject and a cookie are created with the same name.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * The SharedObjects life is dependent up on cookie's life.</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @param	pName string used to name the SharedObject</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @return  SharedObject</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> getLocalCSO<span style="color: #000000;">&#40;</span>pName<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=sharedobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sharedobject.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">SharedObject</span></a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #6699cc; font-weight: bold;">var</span> createStr<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <a href="http://www.google.com/search?q=externalinterface%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:externalinterface.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ExternalInterface</span></a>.<span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;createCookie&quot;</span>, pName, <span style="color: #990000;">&quot;Exists to allow flash local shared objects to clear with browser cache clear.&quot;</span>, <span style="color: #990000;">&quot;7 &quot;</span> <span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #0033ff; font-weight: bold;">return</span> <a href="http://www.google.com/search?q=sharedobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sharedobject.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">SharedObject</span></a>.<span style="color: #004993;">getLocal</span><span style="color: #000000;">&#40;</span>pName<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * an array of cookies recieved from the javascript window.cookies</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * call returned as a string then converted to an array.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @return</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> cookies<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Array</span></a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #0033ff; font-weight: bold;">return</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=externalinterface%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:externalinterface.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ExternalInterface</span></a>.<span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;getCookies&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.<span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;;&quot;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * Acts as the garbage collection for a CachedSharedObject.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * The cookie that was created at the same time is the</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * reference.  If the reference no longer exists, hence</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * the cache was cleared, the SharedObject is removed.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @return Boolean</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> LSOGC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Boolean</span></a></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>CachedSharedObject.cookies<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">&lt;</span> = <span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000000;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'No cookies found, clearing all CachedSharedObjects.'</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">true</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">false</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * reads a cookie via ExternalInterface.  A</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * javascript function returns a string which</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * this function then returns a reformmated</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * version of.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @param	pName</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @return  String</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> readCookie<span style="color: #000000;">&#40;</span>pName<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #6699cc; font-weight: bold;">var</span> readStr<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <a href="http://www.google.com/search?q=externalinterface%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:externalinterface.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ExternalInterface</span></a>.<span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;readCookie&quot;</span>, pName<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #990000;">&quot;Cookie name:  &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> pName <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #990000;">&quot;<span style="">\n</span>Cookie value: &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> readStr;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * Erases a cookia via ExternalInterface.  A</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * javascript function deletes the cookie.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 * @param	pName</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">		 */</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> eraseCookie<span style="color: #000000;">&#40;</span>pName<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<a href="http://www.google.com/search?q=externalinterface%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:externalinterface.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ExternalInterface</span></a>.<span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;eraseCookie&quot;</span>, pName<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">//The javascript</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*Author URL: http://www.quirksmode.org/js/cookies.html</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*Notes: Thanks to the author at the above site for the</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*easy to use functions.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> getCookies<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">unescape</span><span style="color: #000000;">&#40;</span>document.cookie.<span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> createCookie<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>,<span style="color: #004993;">value</span>,days<span style="color: #000000;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>days<span style="color: #000000;">&#41;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">date</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=date%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:date.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Date</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #004993;">date</span>.<span style="color: #004993;">setTime</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">date</span>.<span style="color: #004993;">getTime</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #000000;">&#40;</span>days<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">24</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">60</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">60</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">1000</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #6699cc; font-weight: bold;">var</span> expires = <span style="color: #990000;">&quot;; expires=&quot;</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #004993;">date</span>.toGMTString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #6699cc; font-weight: bold;">var</span> expires = <span style="color: #990000;">&quot;&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	document.cookie = <span style="color: #004993;">name</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">&quot;=&quot;</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">+</span>expires<span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">&quot;; path=/&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #990000;">&quot;Cookie created.&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> readCookie<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000000;">&#41;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #6699cc; font-weight: bold;">var</span> nameEQ = <span style="color: #004993;">name</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #990000;">&quot;=&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #6699cc; font-weight: bold;">var</span> ca = document.cookie.<span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">';'</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i=<span style="color: #000000; font-weight:bold;">0</span>;i <span style="color: #000000; font-weight: bold;">&lt;</span> ca.<span style="color: #004993;">length</span>;i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">c</span> = ca<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">c</span>.<span style="color: #004993;">charAt</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>==<span style="color: #990000;">' '</span><span style="color: #000000;">&#41;</span> <span style="color: #004993;">c</span> = <span style="color: #004993;">c</span>.<span style="color: #004993;">substring</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span>,<span style="color: #004993;">c</span>.<span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">c</span>.<span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span>nameEQ<span style="color: #000000;">&#41;</span> == <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">c</span>.<span style="color: #004993;">substring</span><span style="color: #000000;">&#40;</span>nameEQ.<span style="color: #004993;">length</span>,<span style="color: #004993;">c</span>.<span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">null</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> eraseCookie<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span><span style="color: #000000;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	createCookie<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>,<span style="color: #990000;">&quot;&quot;</span>,<span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li></ol></pre></div></div>
<p><a href="http://dev.hodgedev.com/DeSOL.rar">Download the source files here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=69</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 03: Events, Interactivity, and Timer: the new setInterval.</title>
		<link>http://blog.hodgedev.com/?p=62</link>
		<comments>http://blog.hodgedev.com/?p=62#comments</comments>
		<pubDate>Sun, 22 Mar 2009 04:28:44 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Flex SDK]]></category>
		<category><![CDATA[AS3 Actionscript3 Events Timer]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=62</guid>
		<description><![CDATA[Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 03: Events, Interactivity, and Timer: the new setInterval. 
In part 03, first we talk about why the document class extends Sprite or MovieClip, which FlashDevelop automatically imports Sprite into your project and extends your [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hodgedev.com/tutorials/flashdevelop/fd3_part03/">Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 03: Events, Interactivity, and Timer: the new setInterval. </a></p>
<p>In part 03, first we talk about why the document class extends Sprite or MovieClip, which FlashDevelop automatically imports Sprite into your project and extends your document class with it.</p>
<p>Second, we talk about waiting for the document class to be added to the stage, so that we make access properties of the stage.</p>
<p>Third, import the required event MouseEvent, to handle mouse interactivity.  We setup an event listener for when the end-user has pressed the mouse down while over &#8220;_sprite&#8221;, the square we created in part 02 of this series.  We handled the mouse event with a nice TweenLite driven animation of the &#8220;_sprite&#8221; object.</p>
<p>Fourth, we imported the two classes for handling keyboard interaction.  KeyboardEvent is used to listen for for the key-based events, and the Keyboard class maintains a list of static constants representing unsigned integers used to compare against the keyCode available to the method listener for the KeyboardEvent dispatch.</p>
<p>Fifth, and finally, we talk about the Timer object, which is the new setInterval.  Although you can still use setInterval in Actionscript3, I prefer the Timer object.  Maybe I prefer Timer because of its use of the new event flow, im not sure; although I can say, that I like that you can stop and start it with built in methods.  In this example, we instantiate a Timer object, set it to fire every 1000ms (1 second) and then we listen for that event to be dispatched every second, and have a function fire each time.  The function that fires has a simple trace, that when tested, loops over and over in the console.</p>
<p>Stay tuned for part 04, coming soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=62</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 02: Packages, Classes and drawing API, oh my!</title>
		<link>http://blog.hodgedev.com/?p=55</link>
		<comments>http://blog.hodgedev.com/?p=55#comments</comments>
		<pubDate>Fri, 20 Mar 2009 07:28:49 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[FD3]]></category>
		<category><![CDATA[Flex3 sdk]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=55</guid>
		<description><![CDATA[Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK Part 02: Packages, Classes and drawing API, oh my!
This part of the series starts off by displaying the Actionscript3 API site;  
First, I explain where to learn information about things like Sprite and Event, which were automatically imported and implemented by FlashDevelop3 when [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hodgedev.com/tutorials/flashdevelop/fd3_part02/">Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK Part 02: Packages, Classes and drawing API, oh my!</a></p>
<p>This part of the series starts off by displaying the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/">Actionscript3 API site</a>;  </p>
<p>First, I explain where to learn information about things like Sprite and Event, which were automatically imported and implemented by FlashDevelop3 when we created our project.</p>
<p>Second, we head over to <a href="http://blog.greensock.com/">http://blog.greensock.com/</a> and download TweenMax, though we will only be using TweenLite today (TweenLite included with TweenMax download).</p>
<p>Third, we extract the package into our Actionscript3 class path folder, if you do not already have one, this is a common grounds for you to keep classes and packages, please create one, make note of where you created it, we will be requiring that path in FlashDevelop3 in the next step.  Now extract the &#8220;gs&#8221; folder into the newly created class path folder.</p>
<p>Fourth, we head over to FlashDevelop3 and we select the project from the project tree, mine is on the right, right mouse click on the project name and go to properties.  Once the popup arrives, head to the Classpaths tab, and click the Add Classpath button.  Be sure to input the location of the class path.  NOTE:  This path does not include the &#8220;gs&#8221; folder at the end, we will reference packages in this classpath in their import lines.</p>
<p>Example:<br />
<code>import gs.TweenLite;</code></p>
<p>Fifth, we import the flash.display.Graphics class, create a new Sprite and draw to it using an instance of the Graphics class.</p>
<p>Sixth, we animate the Sprite we drew to using TweenLite.  With one line of code, we have an easy to manage animation with a nice looking Elastic ease applied to it, and it only took twenty seconds to write the animation code out.</p>
<p>Stay tuned for part 03, I hope this is helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=55</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FlashDevelop3 R2 and the Flex 3.3 SDK video tutorial Part 01: Setup and Hello World!</title>
		<link>http://blog.hodgedev.com/?p=47</link>
		<comments>http://blog.hodgedev.com/?p=47#comments</comments>
		<pubDate>Thu, 19 Mar 2009 08:38:30 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[FD3]]></category>
		<category><![CDATA[Flex3 sdk]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=47</guid>
		<description><![CDATA[Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK Part 01: Setup and Hello World!
I have a friend that is eager to learn flash and Actionscript3, but does not have the money to buy the Flash IDE.  I told my friend he could just download FlashDevelop3 and the Flex 3.3 SDK to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hodgedev.com/tutorials/flashdevelop/fd3_part01/">Click here to watch FlashDevelop3 R2 and the Flex 3.3 SDK Part 01: Setup and Hello World!</a></p>
<p>I have a friend that is eager to learn flash and Actionscript3, but does not have the money to buy the Flash IDE.  I told my friend he could just download FlashDevelop3 and the Flex 3.3 SDK to compile with.  My friend didn&#8217;t respond so fast to that on IM;  I had lost him.  It occurred to me to start a small series of tutorials explaining how to compile a SWF with the Flash IDE or Flex Builder 3.</p>
<p>Things to note:<br />
*Flex 3.3 SDK is not the same thing as Flex Builder 3, nor is it the same as the Flex 3 Framework.<br />
*FlashDevelop3 is free, as is the Flex 3 SDK used to compile.<br />
*Most strong AS3 developers seem to be moving out of Flash and away from the time-line, this could leap you forward a great deal to start off with;  That being said, it is still important to understand the time-line and other parts of the Flash IDE.</p>
<p>Good luck, stay tuned for part two where we talk about importing classes, specifically TweenLite.  We create rectangle using the drawing API and animate with TweenLite.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Relativity Calamity</title>
		<link>http://blog.hodgedev.com/?p=42</link>
		<comments>http://blog.hodgedev.com/?p=42#comments</comments>
		<pubDate>Sun, 15 Mar 2009 09:57:57 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Paths]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=42</guid>
		<description><![CDATA[If you use a sniffer, as I spoke on before, you may have noticed that all assets loaded into your SWF are relative to the index.html, or the html file loading the main swf;  Well, all but FLV&#8217;s.  FLV&#8217;s are relative to the SWF file.  This means that if the host swf [...]]]></description>
			<content:encoded><![CDATA[<p>If you use a sniffer, as I spoke on before, you may have noticed that all assets loaded into your SWF are relative to the index.html, or the html file loading the main swf;  Well, all but FLV&#8217;s.  FLV&#8217;s are relative to the SWF file.  This means that if the host swf is not in the same folder as the html file, the relative paths to XML, images, audio, etc, are different from the relative paths of FLV&#8217;s.  This can cause you some problems if you are not aware of it and you merely copy and paste the path of another asset and merely change the name and extension to flv.</p>
<p>Hopefully this helps prove the usefulness of a sniffer to anyone that is not using one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision 3D: Great White and MD2</title>
		<link>http://blog.hodgedev.com/?p=20</link>
		<comments>http://blog.hodgedev.com/?p=20#comments</comments>
		<pubDate>Fri, 27 Feb 2009 23:21:36 +0000</pubDate>
		<dc:creator>Brian Hodge</dc:creator>
				<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[md2]]></category>

		<guid isPermaLink="false">http://blog.hodgedev.com/?p=20</guid>
		<description><![CDATA[The studio that I am working at, Streetwise, has had me checking out the various 3D engines available to Actionscript3.  I played with Papervision3D first and was immediately disappointed with the lack of tutorials.  I then moved onto Away3D because it appeared to have an abundance of tutorials all delivered on an easy to navigate, [...]]]></description>
			<content:encoded><![CDATA[<p>The studio that I am working at, Streetwise, has had me checking out the various 3D engines available to Actionscript3.  I played with Papervision3D first and was immediately disappointed with the lack of tutorials.  I then moved onto Away3D because it appeared to have an abundance of tutorials all delivered on an easy to navigate, well constructed website.  After a few projects in Away3D it became apparent to me that Away3D is a &#8220;PORT&#8221; of Papervision3D, meaning it borrows from, or &#8221; EXTENDS&#8221;, from Papervision3D.  After asking some other developers on <a title="ME!" href="http://stackoverflow.com/users/20628/brian-hodge" target="_blank">stackoverflow.com</a>, I came to the conclusion that I needed to give Papervision3D another shot.  Thanks to google, I found more tutorials and a strong backing behind Papervision3D.  When I was looking around at was being done out there, I stumbled upon <a title="sensible" href="http://www.saveyoursensible.com/" target="_blank"><span style="text-decoration: underline;">http://www.saveyoursensible.com,</span></a> a neat little site that utilizes a 3D character that you can interact with.  I was reading somewhere where people were discussing this mixture of Papervision3D and an md2 for light-wieght, low poly, character animations.  I found a quake model that I like, downloaded the md2 and used the following to produce it in the flash runtime.  The following shows how to render and md2 in the flash runtime using the Papervision3D API.</p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax2"></a><a style="wp-synhighlighter-title" href="#codesyntax2"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript3" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #9900cc; font-weight: bold;">package</span> com.streetwise.ui</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Sprite</span></a>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.view.Viewport3D;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">scenes</span>.Scene3D;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.cameras.Camera3D;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.events.FileLoadEvent;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.materials.BitmapFileMaterial;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.objects.parsers.MD2;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> org.papervision3d.<span style="color: #004993;">render</span>.BasicRenderEngine;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Main extends <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Sprite</span></a></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> viewport<span style="color: #000000; font-weight: bold;">:</span>Viewport3D;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> scene<span style="color: #000000; font-weight: bold;">:</span>Scene3D;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> camera<span style="color: #000000; font-weight: bold;">:</span>Camera3D;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _quakeGuy<span style="color: #000000; font-weight: bold;">:</span>MD2;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> renderer<span style="color: #000000; font-weight: bold;">:</span>BasicRenderEngine;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span><span style="color: #000000;">&#41;</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a>.<span style="color: #004993;">ADDED_TO_STAGE</span>, <span style="color: #004993;">init</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a> = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">viewport = <span style="color: #0033ff; font-weight: bold;">new</span> Viewport3D<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">550</span>, <span style="color: #000000; font-weight:bold;">400</span>, <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>viewport<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">scene = <span style="color: #0033ff; font-weight: bold;">new</span> Scene3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">camera = <span style="color: #0033ff; font-weight: bold;">new</span> Camera3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">renderer = <span style="color: #0033ff; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">camera.<span style="color: #004993;">zoom</span> = <span style="color: #000000; font-weight:bold;">400</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">camera.<span style="color: #004993;">focus</span> = <span style="color: #000000; font-weight:bold;">12</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">_quakeGuy = <span style="color: #0033ff; font-weight: bold;">new</span> MD2<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">_quakeGuy.rotationX = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">90</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">_quakeGuy.rotationY = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">90</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">_quakeGuy.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> FileLoadEvent.ANIMATIONS_COMPLETE, onAnimationsComplete <span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">_quakeGuy.<span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;assets/quakeguy/tris.md2 &quot;</span> , <span style="color: #0033ff; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;assets/quakeguy/quake.png&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">scene.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> _quakeGuy <span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a>.<span style="color: #004993;">ENTER_FRAME</span>, _onEnterFrame<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onAnimationsComplete<span style="color: #000000;">&#40;</span> event<span style="color: #000000; font-weight: bold;">:</span>FileLoadEvent <span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">_quakeGuy.<span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">renderer.renderScene<span style="color: #000000;">&#40;</span>scene, camera, viewport<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div></li></ol></pre></div></div>
<p>It is important to try things, play with functionality, learn how to dig into the docs make something new.  The more you experiment, the better you get at experimenting.  I was in no way the first to do this, but I now have a great understanding.</p>
<p>The next step is to purchase QTiP, a plugin for 3D Studio Max, which enables you to create your own md2 files complete with animation.  This is how the developers of the sensibles project above achieved their goal.</p>
<p><a title="View Demo" href="http://dev.hodgedev.com/papervision3D_MD2_MODEL_ANIMATION/" target="_blank">View Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hodgedev.com/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
