<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>LittleArea</title>
	
	<link>http://www.littlearea.com</link>
	<description>a little place for everyone</description>
	<lastBuildDate>Wed, 15 Jul 2009 16:40:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Littlearea" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="littlearea" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>AS3: Handling Events the Right Way</title>
		<link>http://www.littlearea.com/2009/07/as3-handling-events-the-right-way/</link>
		<comments>http://www.littlearea.com/2009/07/as3-handling-events-the-right-way/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 16:32:49 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=200</guid>
		<description><![CDATA[addEventListener() is one of the most used functions in Actionscript 3. Any AS3 application that allows user interaction will require the use of this function. I won&#8217;t explain what it is used for; if you don&#8217;t know, this article is not for you.
This article will illustrate the appropriate way to subscribe to events from an [...]]]></description>
			<content:encoded><![CDATA[<p>addEventListener() is one of the most used functions in Actionscript 3. Any AS3 application that allows user interaction will require the use of this function. I won&#8217;t explain what it is used for; if you don&#8217;t know, this article is not for you.</p>
<p>This article will illustrate the appropriate way to subscribe to events from an object.</p>
<p><span id="more-200"></span></p>
<p>There are so many AS3 examples and tutorials out on the internet that make use of the addEventListener() function. Why? It is hugely important if you plan on making anything other than an animation. In all of these examples and tutorials, very few I have seen will actually explain the appropriate way to work with events and the pitfalls if you do not use them correctly.</p>
<p>Following is an example of a typical use of the addEventListener() function:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">someObject.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span>.<span style="color: #004993;">CLICK</span>, ClickHandler<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>Looks pretty simple, and really it is. This simply calls the function ClickHandler any time the user clicks on someObject. That is exactly what we want to do, so what is the big problem? There isn&#8217;t a big problem until you are done with someObject.</p>
<p>Lets say after you click on someObject (pretend it is a button) it takes you to another frame. someObject is no longer needed, so you remove it from the stage and the application continues on. What most examples don&#8217;t tell you is that it is extremely important to remove the click event from the object before you dispose of it or you may as well just leave the entire object hanging around in memory.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">someObject.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span>.<span style="color: #004993;">CLICK</span>, ClickHandler<span style="color: #000000;">&#41;</span>;
someContainer.<span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span>someObject<span style="color: #000000;">&#41;</span>;
someObject = <span style="color: #0033ff; font-weight: bold;">null</span>;</pre></div></div>

<p>Certainly you have seen some example of the 3 lines above. This set of lines effectively removes someObject from the stage and sets the object reference to null. Possibly the most important line is the first line and many times this line is either looked over completely or not explained well enough to illustrate its importance. To an experienced AS3 programmer, it should go without saying that you need to remove all unnecessary event listeners when they are no longer needed, however a beginner may not understand the importance.</p>
<p>Why is this so important? From the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/EventDispatcher.html#addEventListener()">Actionscript 3.0 Language Reference</a>:</p>
<p><em>If you no longer need an event listener, remove it by calling removeEventListener(), <b>or memory problems could result</b>. Objects with registered event listeners are not automatically removed from memory because the garbage collector does not remove objects that still have references.</em></p>
<p>What this means is that if you do not call removeEventListener() on all registered events of an object, it will not go through the garbage collector. You will have an object floating around using up memory that could have been released and used for something else. Simply setting an object to null is not enough, you must remove all event listeners before you set it to null.</p>
<p>This is not a fix-all for memory leaks obviously, but it is a huge pitfall that can be avoided with a little bit of knowledge and planning. I learn a lot of information by searching for tutorials and examples on the internet and have seen examples of the above situation all over. However, most will not explain the importance of event listener cleanup and how it relates to memory issues.</p>
<p>For what it is worth, I am aware of the &#8220;useWeakReference&#8221; parameter of the addEventListener() function. Using this in my opinion is a lazy fall back that may introduce other problems that are tough to find. Certainly there is a place where it is useful/necessary, but I don&#8217;t like to use it when you can explicitly clean up your events to ensure everything is handled appropriately.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/07/as3-handling-events-the-right-way/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CarzDB</title>
		<link>http://www.littlearea.com/2009/06/carzdb/</link>
		<comments>http://www.littlearea.com/2009/06/carzdb/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 17:23:06 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=198</guid>
		<description><![CDATA[My first attempt at developing a Flex application!
CarzDB is a database application that stores information about a die-cast car collection. A good friend of mine has a die-cast car collection and he needed something to catalog his collection for easy reference information. We developed an application a few years ago using VB.NET 2005 for him [...]]]></description>
			<content:encoded><![CDATA[<p>My first attempt at developing a Flex application!</p>
<p><a href="http://www.carzdb.com">CarzDB</a> is a database application that stores information about a die-cast car collection. A good friend of mine has a die-cast car collection and he needed something to catalog his collection for easy reference information. We developed an application a few years ago using VB.NET 2005 for him to use and it worked great. He distributed it freely via the <a href="http://www.hotwheelscollectors.com/">HotWheelsCollectors</a> forum. We received nothing but positive feedback from all the users that downloaded it.</p>
<p>A few months ago we rewrote the entire program using Flex 3 and AIR to develop a cross-platform version with new features. We used the same premise of the original application in that everything possible must be customizable for the end user. Another requirement was that it must be as portable as possible. With our new build, it is more portable than before because the original version required Windows. However, now the application runs on Windows, Mac OSX, and Linux.</p>
<p><span id="more-198"></span></p>
<p>Being my first attempt at using Flex, I had no idea what I was in for. I have been using Flash CS3 with AS3 for about a year or so and have been able to accomplish quite a few challenges that I have attempted. My assumption was that Flex wasn&#8217;t a whole lot different from Flash&#8230; I was quite wrong and happy that I was.</p>
<p>Don&#8217;t get me wrong, Flash is an great authoring tool for interactive web content and will continue to be useful to me and other developers for quite some time. However, if you have a need for a database application, web or desktop, Flex provides some amazing pre-built form elements that handles working with data extremely well, far better than Flash ever could.</p>
<p>Although I have only just begun to work with Flex, CarzDB is a full featured database application that we intend to expand on in the future. It took a few days to become comfortable working with Flex, but after a slight adjustment period, I felt right at home. Since it is all based on the Flash Player, it uses the same syntax as Flash (Actionscript 3) so it was very easy to work with for me. I still don&#8217;t fully understand all of the &#8220;new&#8221; functionality that Flex provides (such as states), but I was able to accomplish everything that I needed to develop this application.</p>
<p>One thing I was not able to figure out (and still haven&#8217;t) was how to bind a database result to a tree view and have it display in a hierarchical manner. I ended up reading the result into a custom built array (which takes some time for large result sets) and applying the resulting array as the data bound to the tree view. The ideal solution is to take the result set and simply bind it to the tree view and then somehow program the tree view to display the hierarchy that I want. If anyone knows how to do this, please, please, please let me know <img src='http://www.littlearea.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>Aside from that one hang up, I am quite pleased with the outcome of the application and how easy it was to develop using the Flex Framework and components that come with it. If you have a die-cast collection, check out the application and see if you can&#8217;t make use of it. The old version is available for free, but we are selling the new version for a small price of $20 per copy. There are no recurring fees to use the software. There are tons of screen shots in the documentation section of the <a href="http://www.carzdb.com">CarzDB website</a>. Let us know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/06/carzdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screen Scales</title>
		<link>http://www.littlearea.com/2009/06/screen-scales/</link>
		<comments>http://www.littlearea.com/2009/06/screen-scales/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 22:52:11 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=192</guid>
		<description><![CDATA[Screen Scales is a project that a friend of mine and I created. This is the first free AIR application that we have created. It is a utility that allows you to drag points around the screen and it will calculate the distance between them in pixels (by default).
Although there are a few different screen [...]]]></description>
			<content:encoded><![CDATA[<p>Screen Scales is a project that a friend of mine and I created. This is the first free AIR application that we have created. It is a utility that allows you to drag points around the screen and it will calculate the distance between them in pixels (by default).</p>
<p>Although there are a few different screen caliper type of programs, we wanted to create our own so we could make it do exactly what we wanted (and more). The features that we added that may be different from some of the other caliper programs are the ability to have multiple line segments on-screen at once, measure diagonal distances with the ability to see the horizontal and vertical delta measurements, display angle measurements, set a custom scale factor, and others.</p>
<p>If you are interested, you can download it for free by visiting the <a href="http://www.littlearea.com/projects/screen-scales">Screen Scales</a> Project page.</p>
<p>Some day I will get around to posting about some of the things we did to make it work the way we wanted it to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/06/screen-scales/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Reading Data from XML</title>
		<link>http://www.littlearea.com/2009/02/reading-data-from-xml/</link>
		<comments>http://www.littlearea.com/2009/02/reading-data-from-xml/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 05:34:15 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=120</guid>
		<description><![CDATA[We walk through an example learning how to load external data stored in an xml format into our Flash project. The classes we take advantage of in this example are the URLLoader and URLRequest classes that give us the necessary functionality to load and read data from external resources.]]></description>
			<content:encoded><![CDATA[<p>One of the most common actions to do in a flash movie is reading data from outside sources. There are many different ways and formats for reading data, and we will start with reading from an XML document.</p>
<p>Reading from an XML document provides us with a lot of different abilities. First off, you can modify an XML file easier than a Flash file because you don&#8217;t have to recompile it. Second (and more importantly in my opinion), XML files can be the dynamically creating using PHP which means you can pull data directly out of a database.<br />
<span id="more-120"></span><br />
Lets get started looking at the Actionscript 3 code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">MovieClip</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">URLRequest</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">URLLoader</span>;
&nbsp;
  <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> xml_example extends <span style="color: #004993;">MovieClip</span> <span style="color: #000000;">&#123;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> xml_example<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Above you see the bare bones of a class called xml_example. The first thing to point out is the two import statements that are necessary to read an external XML file (flash.net.URLRequest and flash.net.URLLoader). Of course you will need the typical MovieClip and Event imports as well.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> xml_example<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLLoader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">loader</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, xmlLoaded<span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">loader</span>.<span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;example/file.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> xmlLoaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>This is our constructor function. What we see here is a new URLLoader object created (called loader). Then we apply an Event Listener to it so we know when the file has been loaded (Event.COMPLETE) and where it should continue processing (the xmlLoaded function). And finally we tell the loader object to load a file using a new URLRequest object pointing to the file.xml file located in the example folder.</p>
<p>After all of this code has executed, and the COMPLETE event has been dispatched, we continue processing in the xmlLoaded function.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> xmlLoaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #6699cc; font-weight: bold;">var</span> xml<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">XML</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">data</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #6699cc; font-weight: bold;">var</span> posts<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">XMLList</span> = xml.post;
  <span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span>;
  <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">c</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = posts.<span style="color: #004993;">length</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
  e.<span style="color: #004993;">currentTarget</span>.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, xmlLoaded<span style="color: #000000;">&#41;</span>;
&nbsp;
  <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #004993;">c</span>; i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>posts<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.title.<span style="color: #004993;">text</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #990000;">&quot;: &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> posts<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.short.<span style="color: #004993;">text</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Finally, here is our function that processes the xml file after it has been loaded. First we create a few objects. The XML object (named xml) is where all of our data is stored which is pulled from the target of the event (our URLLoader object from the previous function). The posts object is an XMLList that is very similar to an array. We selected the post property of the XML object which represents all of the data within our xml file between the &lt;post&gt; and &lt;/post&gt; tags.</p>
<p>After we have all of our data into usable objects, it is as simple as iterating through an array to access the data within these objects. We use a counter variable (i) and a limit variable (c) to step through the posts object and trace out the contents. You access the data by using the same property name as is in the xml file. Then call the text() method to extract the text. Obviously you would probably do something a little more exciting than simply tracing the data, but for this example it will suffice.</p>
<p>Following is what a sample xml file might look like along with the output that we would expect to see from our trace functions.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;iso-8859-1&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;posts<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;post<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Sample Post 1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;short<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Sample short description for the first post.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/short<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/post<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;post<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Here is Title 2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;short<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is the second post and this is what it is about...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/short<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/post<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/posts<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
------------  Output ------------
Sample Post 1: Sample short description for the first post.
Here is Title 2: This is the second post and this is what it is about...</pre></td></tr></table></div>

<p>This is a simple way to read data into flash using Actionscript 3. I have used it for many different things such as slide shows where the image path and caption are saved in xml and even in a database. There is more that you can do with this such as listen for incremental events triggered by the URLLoader object which allows you to create a progress bar, but I have never needed to do this as the files that I have loaded are typically small usually containing index type of information.</p>
<p>Check back in the future, I may add a second part to this tutorial to experiment with the progress bar.</p>
<p>Take Care! Wayne</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/02/reading-data-from-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What Makes a Good Flash Game?</title>
		<link>http://www.littlearea.com/2009/02/what-makes-a-good-flash-game/</link>
		<comments>http://www.littlearea.com/2009/02/what-makes-a-good-flash-game/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 00:19:40 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[advice]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[guide]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=105</guid>
		<description><![CDATA[What I enjoy about games and what makes me hit the browser back button. It doesn't take much to drive players away from what could have been a great game. It also doesn't take much to make the experience a little more enjoyable. Find out how...]]></description>
			<content:encoded><![CDATA[<p>Flash games are all over the internet. What separates the good ones from the not so good ones? My experiences are based on playing them as I have not yet finished and published what I would consider a &#8220;good&#8221; game. I have however wasted many hours playing thousands of different flash games. Some games I will play for hours and even bookmark them to play again, and others I never even end up passed the main menu (if there is one).</p>
<p>Forget game play and what makes a game fun for now. This post will be focusing on things that drive players away from what could have been a great game and elements you must include in all games no matter the genre.<br />
<span id="more-105"></span></p>
<h3>Don&#8217;t do These</h2>
<p>There are a few different things that I find rather annoying while playing some games that typically drive me away from them never to return. These are things that you should avoid at all costs. Notice I didn&#8217;t say &#8220;attempt&#8221; as these are all things that can be completely avoided or at least re-worked.</p>
<p><strong>Sound</strong><br />
First of all, sound is not required, however it can and does enhance a decent game dramatically. So, don&#8217;t forget about adding sounds to your game where applicable. If you do include sounds, always (and I mean always) at least give the player the option to mute all game sounds including background music and make it easy to do. There is nothing worse than hunting around for the mute button because you are listening to your favorite song. It is even worse (in my opinion borderline unplayable) if there is no mute option.</p>
<p><strong>Advertisements</strong><br />
Advertisements are a great way to monetize your hard work programming and I completely support them in most cases. Although the few games that I have published only make me pennies a day so far, I still think this is a good way to make money from your games. I don&#8217;t mind seeing an advertisement for 10 seconds while the game is downloading to my cache, but don&#8217;t add advertisements in the middle of the game. Ads that show up in between levels are fine if they show up every once in a while, but if a level only takes a minute or two to complete, don&#8217;t show me an advertisement between every level. If I beat the first level or die rather quickly and an ad shows up before I am able to try again, it is almost always an immediate browser back button.</p>
<p><strong>Mouse vs Keyboard</strong><br />
It doesn&#8217;t matter which input method your game uses, but if it relies on one and not the other, never require the player to use the second one. For example, if your game utilizes the keyboard for controls, never require the player to click with the mouse to start the next level. Provide a key they can press to go to the next level as well This is another one of those things that may cause me to go for the browser back button, though it isn&#8217;t necessarily an immediate response.</p>
<h3>Do These</h2>
<p>On the other side of the coin are the things that players expect out of games. These are things that should be included in all games no matter what.</p>
<p><strong>Obvious Hot Spots</strong><br />
If your game requires a menu or buttons to move between different screens, make them visible and rather obvious that they are there to click on. Similar to the way web pages are designed, links are typically a color that stands out (in fact you have to do extra work to make links not look like links), it should be obvious to the player that the start button is the big red button that says Start. Of course your buttons can still look nice without being an eye sore, but use consistency.</p>
<p><strong>Provide Instructions</strong><br />
Even though I typically never click the &#8220;How to Play&#8221; links found in many games, I do like to know that it is available if I need it. Usually my progression in games is to hit the Play or Start button to get going right away. You can usually figure out what to do by just jumping in and even if not, you should be able to get a feel for what the game is about. If I am even mildly intrigued, I will go back and read up on how to play. Just make sure it is available unless it is brutally obvious what to do.</p>
<p><strong>Presentation</strong><br />
Spend some time and make your game look like you are proud of it. Whether your game features stickmen in a black and white world or professional level graphics, it is possible to make your game look good. You don&#8217;t have to be a graphics artist to make your game look decent. Follow a theme or at least be consistent and you will do yourself and your players a favor.</p>
<p>These are just a few things that all developers should consider when creating flash games for the public to play. Remember, if you plan to monetize your games, it is the players that will be your source of money so keep them happy.</p>
 <script type="text/javascript"><!--
google_ad_client = "pub-5361496744802742";
/* small links (horizontal) */
google_ad_slot = "2678465739";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/02/what-makes-a-good-flash-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Game – Kingdom of Kroz</title>
		<link>http://www.littlearea.com/2009/02/flash-game-kingdom-of-kroz/</link>
		<comments>http://www.littlearea.com/2009/02/flash-game-kingdom-of-kroz/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 21:05:54 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[kroz]]></category>
		<category><![CDATA[remake]]></category>
		<category><![CDATA[retro]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=81</guid>
		<description><![CDATA[Kingdom of Kroz &#8211; the Flash version! 
Play a perfect remake of the classic 80&#8217;s DOS game originally created by Scott Miller of Apogee Games. Talon Designs created a flash version able to be played without the need for DOSBox.

Controls
Cheats
About Kingdom of Kroz



Controls:


NumPad 7 / U = Up-Left
NumPad 8 / I = Up
NumPad 9 / [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.littlearea.com/2009/02/flash-game-kingdom-of-kroz/"><img border="0" class="alignright" src="http://www.littlearea.com/flash_games/kingdom-of-kroz/_thumb_100x100.jpg" /></a>Kingdom of Kroz &#8211; the Flash version! </p>
<p>Play a perfect remake of the classic 80&#8217;s DOS game originally created by Scott Miller of Apogee Games. Talon Designs created a flash version able to be played without the need for DOSBox.<br />
<span id="more-81"></span></p>
<div class="alignleft" style="padding-right:20px;"><a href="#gamecontrols">Controls</a></div>
<div class="alignleft" style="padding-right:20px;"><a href="#gamecheats">Cheats</a></div>
<div class="alignleft" style="padding-right:20px;"><a href="#gameabout">About Kingdom of Kroz</a></div>
<p><br class="clear" /></p>
<div align="center"><embed src="http://www.littlearea.com/flash_games/kingdom-of-kroz/kroz.swf" width="640" height="300"></div>
<p><a name="gamecontrols"></a><br />
<h3>Controls:</h3>
<p></p>
<div class="alignleft" style="width:50%;">
<strong>NumPad 7 / U</strong> = Up-Left<br />
<strong>NumPad 8 / I</strong> = Up<br />
<strong>NumPad 9 / O</strong> = Up-Right<br />
<strong>NumPad 4 / J</strong> = Left<br />
<strong>NumPad 6 / L</strong> = Right<br />
<strong>NumPad 1 / N</strong> = Down-Left<br />
<strong>NumPad 2 / M</strong> = Down<br />
<strong>NumPad 3 / ,</strong> (Comma) = Down-Right
</div>
<div class="alignleft">
<strong>W</strong> = Whip<br />
<strong>T</strong> = Teleport<br />
<strong>P</strong> = Pause<br />
<strong>Q</strong> = Quit<br />
<strong>V</strong> = Sound On/Off<br />
<strong>+</strong> = Item Messages On<br />
<strong>-</strong> = Item Messages Off
</div>
<p><br class="clear" /><br />
<a name="gamecheats"></a><br />
<h3>Cheats:</h3>
<p><strong>Secret Mode:</strong><br />
By typing &#8220;X&#8221; at the select game screen, you are entered into a &#8220;Secret Game&#8221; mode. Once in secret mode, there are two things you can do during gameplay.</p>
<p><strong>Shift + 0</strong> = Replenish Items (Gems, Whips, Teleports &#038; Keys)<br />
<strong>Shift + 9</strong> = Advance 1 Level</p>
<p><strong>Talon Designs God Mode:</strong><br />
If at the select game screen, you hit &#8220;CTRL+Shift+~&#8221; this will enable a &#8220;god&#8221; type mode, that was not available in the original game. With GOD mode enabled, there are many things you can do during gameplay.</p>
<p><strong>1</strong> = Gems + 100<br />
<strong>2</strong> = Whips + 100<br />
<strong>3</strong> = Teleports + 100<br />
<strong>4</strong> = Keys + 100<br />
<strong>5</strong> = Whip Power + 1<br />
<strong>8</strong> = Previous Level<br />
<strong>9</strong> = Refresh Current Level<br />
<strong>0</strong> = Next Level<br />
<a name="gameabout"></a><br />
<h3>About Kingdom of Kroz</h3>
<p>Kingdom of Kroz was originally created back in the 1980&#8217;s by Scott Miller. The game was developed to run on DOS using only alphabetic graphics. It was a great game (and still is) back when there were no such thing as 3D processing power available to consumers.</p>
<p>Until now, Kingdom of Kroz could only be run using a program called DOSBox which emulates a DOS window. We used this program extensively to recreate the game as closely as we possibly could to the original.</p>
<p>This game is completely playable, though it is only about 95% complete. The highs scores table does not work and there may be a few things in the original that we missed. Kingdom of Kroz was the first of seven different adventures. We originally planned to create all of the episodes, but the initial interest when we released it back in August (2008) was not enough to compel us to spend the time creating the rest of the episodes. If there is a new found interest in this game, we may consider completing the project adding the next 6 adventures.</p>
<p>When we built the game, we basically built an engine for the game in such a way that none of the levels are compiled into the swf file. All of the levels are loaded from external xml files. We decided to build it this way, not because it would be easier (though it may have been), but because we wanted the ability to create our own levels just for fun. Again, we have not spent very much time at all on any custom levels, but know that it is possible if you are interested in doing so.</p>
<p>We hope you enjoy playing, and let us know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/02/flash-game-kingdom-of-kroz/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Simple Flash Slide Show</title>
		<link>http://www.littlearea.com/2009/02/simple-flash-slide-show/</link>
		<comments>http://www.littlearea.com/2009/02/simple-flash-slide-show/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:00:35 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=49</guid>
		<description><![CDATA[The first tutorial will be to create a very simple slide show using Flash and Actionscript 3. I know, there are thousands of these things out there and it would be easier to download one of those and use it, but by building your own you will learn some of the concepts in programming with [...]]]></description>
			<content:encoded><![CDATA[<p>The first tutorial will be to create a very simple slide show using Flash and Actionscript 3. I know, there are thousands of these things out there and it would be easier to download one of those and use it, but by building your own you will learn some of the concepts in programming with Actionscript 3.<br />
<span id="more-49"></span><br />
So, these are the things we want our slideshow to accomplish:</p>
<ul>
<li>read from an external xml list</li>
<li>size independant</li>
<li>ability to change the speed</li>
<li>customized right click menu</li>
</ul>
<p>Lets get started!</p>
<p>I am assuming you know enough about Flash to be able to create your project files and store them in an appropriate directory. If not, please visit the Flash Basics post.</p>
<p>You will need two files for this project:</p>
<ul>
<li>Blank Flash (.fla) file</li>
<li>Actionscript (.as) file</li>
</ul>
<p>In the .fla file set the Document class to the name of the class you will be using (my example is <em>slideshow</em>. The stage dimensions and background color don&#8217;t really matter for this project, but you can set them to whatever you like.</p>
<p>Once you have set up the Document class in the .fla file, the rest of the work will be completed in the .as file. Create the structure of the .as file as seen below.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #000000; font-weight: bold;">*</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #000000; font-weight: bold;">*</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.utils</span>.<span style="color: #000000; font-weight: bold;">*</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #000000; font-weight: bold;">*</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.ui</span>.<span style="color: #000000; font-weight: bold;">*</span>;
  <span style="color: #0033ff; font-weight: bold;">import</span> caurina.transitions.<span style="color: #000000; font-weight: bold;">*</span>;
&nbsp;
  <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> slideshow extends <span style="color: #004993;">MovieClip</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> clock<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Timer</span>;
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speed<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> imgs<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span>;
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> imgIndex<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span>;
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">index</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>;
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span>;
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> slideshow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
    <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><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> indexLoaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> loadImage<span style="color: #000000;">&#40;</span>file<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> imageLoaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> nextImage<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TimerEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Now for the details&#8230;</p>
<h3>Imports (2 &#8211; 7):</h3>
<ul>
<li>display, events &#8211; common MovieClip imports</li>
<li>utils &#8211; needed for the Timer</li>
<li>net &#8211; needed for the xml functions</li>
<li>ui &#8211; needed for the custom right click menu</li>
<li>caurina functions are a custom package called Tweener. This package is a great open source way to create custom tweens in your projects without having to use the time line. You can download it here: <a href="http://code.google.com/p/tweener/">http://code.google.com/p/tweener/</a></li>
</ul>
<h3>Variables (10 &#8211; 15):</h3>
<ul>
<li>clock &#8211; the timer used for the transitions</li>
<li>speed &#8211; the length of time an image is displayed</li>
<li>imgs &#8211; a MovieClip array holding all of the images after they have been loaded</li>
<li>imgIndex &#8211; an Array made up of the relative path to where the images are stored</li>
<li>index &#8211; identifies the currently displayed image by its index in the imgs array</li>
<li>loader &#8211; the URLLoader object we will use to load the xml index</li>
</ul>
<h3>slideshow() &#8211; Constructor Function</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> slideshow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #6699cc; font-weight: bold;">var</span> mnu<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenu</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenu</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  mnu.<span style="color: #004993;">hideBuiltInItems</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #6699cc; font-weight: bold;">var</span> item<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuItem</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenuItem</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;© LittleArea&quot;</span><span style="color: #000000;">&#41;</span>;
  mnu.<span style="color: #004993;">customItems</span>.<span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>item<span style="color: #000000;">&#41;</span>;
  <span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">contextMenu</span> = mnu;
&nbsp;
  <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The first five lines create the custom right click menu and remove the default menu items. All we need to do is create a new ContextMenu object. Then we call hideBuiltInItems() to remove all of the default menu items (zoom, quality, etc). There are a few that remain that we cannot remove (to my understanding). Create a new ContextMenuItem and send it the text that you want to display. Then push the new item into the customItems array and assign this.contextMenu to the new new menu. You can add event listeners to the custom items to navigate to a website or interact with your application if you would like to. After we are done with the custom menu, a call to init() will kick off the rest of the loading.</p>
<h3>init()</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><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><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  imgs = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  imgIndex = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">index</span> = <span style="color: #000000; font-weight:bold;">0</span>;
  clock = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Timer</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">5000</span><span style="color: #000000;">&#41;</span>;
  clock.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">TimerEvent</span>.<span style="color: #004993;">TIMER</span>, nextImage<span style="color: #000000;">&#41;</span>;
&nbsp;
  <span style="color: #6699cc; font-weight: bold;">var</span> filename<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;index&quot;</span>;
  <span style="color: #6699cc; font-weight: bold;">var</span> paramObj<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Object</span> = <span style="color: #004993;">loaderInfo</span>.<span style="color: #004993;">parameters</span>;
  filename = <span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>paramObj<span style="color: #000000;">&#91;</span><span style="color: #990000;">'index'</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
  <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLLoader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">url</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, indexLoaded<span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">url</span>.<span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span>filename <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #990000;">&quot;.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The first four lines just initialize some of the variables and objects used and set some default values where applicable. The 5th line adds the TIMER event listener to our clock.</p>
<p>The <em>filename</em> variable is used to pull the name of the xml file that we are wanting to load. In the HTML document, you will add the name of the xml file on to the swf file name so we know which index to load. (ex: &#8220;./slideshow.swf?index=xmlfile&#8221;) Using the loaderInfo.paramaters array, we can find out what the file name of the xml file is. This will allow us to use the same swf file to load different xml files. This can even be done on the same page multiple times.</p>
<p>The last three lines use the URLLoader class to load the xml file we identified above. You must also add an event listener to process the file after it has been completely loaded. Also, don&#8217;t forget to append the .xml onto the filename variable.</p>
<h3>indexLoaded(e:Event)</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> indexLoaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #6699cc; font-weight: bold;">var</span> xml<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">XML</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">XML</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">data</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #6699cc; font-weight: bold;">var</span> img<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">XMLList</span> = xml.image;
  <span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">uint</span>;
  <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">c</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = img.<span style="color: #004993;">length</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
  e.<span style="color: #004993;">currentTarget</span>.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, indexLoaded<span style="color: #000000;">&#41;</span>;
&nbsp;
  speed = xml.speed<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">text</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  clock.<span style="color: #004993;">delay</span> = speed <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">1000</span>;
  <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #004993;">c</span>; i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    imgIndex.<span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>img<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #004993;">text</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #000000;">&#125;</span>
&nbsp;
  loadImage<span style="color: #000000;">&#40;</span>imgIndex<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This function is called after the xml index file has been completely loaded. We will use the XML object to pares the index file to read the necessary data. Using the event object we get from the URLLoader, we assign our XML object to e.target.data which is what we are after. i and c are temporary variables used for looping through our xml data.</p>
<p>Our xml file will be structures as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;iso-8859-1&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;images<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;speed<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/speed<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>images/img1.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>images/img2.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>images/img3.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>images/img4.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/image<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/images<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>We will read the speed from the xml file and multiply it by 1000 to roughly represent seconds. In our example there will be approximately 5 seconds between each image. You read from an XML object as if it was an object full of arrays correlating to the tags in your xml file. Set the clock delay speed to our new value.</p>
<p>Now, using a XMLList object, we can loop through all of the image entries and store the path in our imgIndex array. You can use relative or absolute paths in your xml file. The path should be relative to the HTML document where the swf file is embedded (not relative to the swf file itself). Once we finish looping through the list of images, call the loadImage() function and pass the first image path.</p>
<h3>loadImage(file:String)</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> loadImage<span style="color: #000000;">&#40;</span>file<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">loader</span>.<span style="color: #004993;">contentLoaderInfo</span>.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, imageLoaded<span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">loader</span>.<span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span>file<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The loadImage function simply creates a Loader object to load the image specified by the file parameter. Add an event listener to the Loader object (via the contentLoaderInfo property) so we know when the image has completed loading. Once this event fires, we end up at imageLoaded().</p>
<h3>imageLoaded(e:Event)</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> imageLoaded<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  e.<span style="color: #004993;">currentTarget</span>.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, imageLoaded<span style="color: #000000;">&#41;</span>;
  imgs.<span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
  imgs<span style="color: #000000;">&#91;</span>imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">target</span>.<span style="color: #004993;">content</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>imgs<span style="color: #000000;">&#91;</span>imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
  <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>imgs.<span style="color: #004993;">length</span> == <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>
    imgs<span style="color: #000000;">&#91;</span>imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">alpha</span> = <span style="color: #000000; font-weight:bold;">1</span>;
  <span style="color: #0033ff; font-weight: bold;">else</span>
    imgs<span style="color: #000000;">&#91;</span>imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">alpha</span> = <span style="color: #000000; font-weight:bold;">0</span>;
&nbsp;
  <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> clock.<span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">&lt;</span> imgIndex.<span style="color: #004993;">length</span><span style="color: #000000;">&#41;</span> loadImage<span style="color: #000000;">&#40;</span>imgIndex<span style="color: #000000;">&#91;</span>imgs.<span style="color: #004993;">length</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>After an image is fully loaded we end up at the imageLoaded() function. We first push a new MovieClip into our imgs array and then add the image to the newly created MovieClip object. You accomplish this by pulling the content from the target of our event (the contentLoaderInfo from the loadImage function). Then we add the MovieClip containing the image to the stage. </p>
<p>After this is complete we set the alpha value to 1 (fully visible) if it is the first image loaded (we know this by the length of the imgs array). If it is not the first image, we make it invisible (alpha = 0). </p>
<p>We start the clock if there are at least 2 images in the imgs array so the images will start to cycle. </p>
<p>Finally, if we haven&#8217;t loaded all of the images yet, call the loadImage() function with the next file that hasn&#8217;t been loaded yet.</p>
<h3>nextImage(e:TimerEvent)</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> nextImage<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">TimerEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  Tweener.addTween<span style="color: #000000;">&#40;</span>imgs<span style="color: #000000;">&#91;</span><span style="color: #004993;">index</span><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span>, <span style="color: #004993;">time</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">2</span>, transition<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;linear&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #004993;">index</span><span style="color: #000000; font-weight: bold;">++</span>;
  <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">index</span> <span style="color: #000000; font-weight: bold;">&gt;</span> imgs.<span style="color: #004993;">length</span> <span style="color: #000000; font-weight: bold;">-</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #004993;">index</span> = <span style="color: #000000; font-weight:bold;">0</span>;
  Tweener.addTween<span style="color: #000000;">&#40;</span>imgs<span style="color: #000000;">&#91;</span><span style="color: #004993;">index</span><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span>, <span style="color: #004993;">time</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">2</span>, transition<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;linear&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This function is fired every time our clock ticks after it has been started (in this example, every 5 seconds).</p>
<p>First we fade the current image out (this is known from the index variable). To use Tweener, all you have to do is call the addTween() function with the object you are wanting to tween and a custom object with all of the necessary parameters. In this case, we want to fade the MovieClip in the imgs array at the current location of index. Then we build the object to tell Tweener what to do. We want to set the alpha to 0; we want it to take 2 seconds; and we want to use the linear transition method. This is a very basic use of the Tweener class. If you would like to know more about it, please see the documentation located here: <a href="http://code.google.com/p/tweener/">http://code.google.com/p/tweener/</a></p>
<p>After we have started the fade out tween, we set the new current index to the next image. Check to see if we have passed the end of the array and start back over at 0 if we have. Then, follow the same steps above to add another Tweener function to the new image to make it fade in.</p>
<p>Tweener runs both of the functions at the same time so it appears as if one image is fading into another instead of one fading out and then one fading in.</p>
<p>That&#8217;s all there is to it. Obviously there is more that could be added to this application (and maybe we will add on to it in another tutorial), but it works as-is as a very simple flash slide show.</p>
<h3>Adding to your HTML page</h3>
<p>To complete the whole project we need to add it into our HTML page. There are a few different ways to embed it, but I will only show the simplest way.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;embed 
  src=&quot;slideshow.swf?index=index1&quot; 
  wmode=&quot;transparent&quot; 
  scale=&quot;noscale&quot; 
  salign=&quot;tl&quot; 
  quality=&quot;high&quot;
  pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; 
  type=&quot;application/x-shockwave-flash&quot; 
  width=&quot;400&quot; 
  height=&quot;300&quot;&gt;
&lt;/embed&gt;</pre></div></div>

<p>As you can see the src tag will load slideshow.swf and the xml file it will load is called index1.xml. There are a few important tags that are worth noting:</p>
<ul>
<li>wmode=&#8221;transparent&#8221; &#8211; this will make the background transparent so if the images are not all the same size, there will not be a solid background anywhere</li>
<li>scale=&#8221;noscale&#8221; &#8211; this prevents the flash movie from scaling, it will be stretched to the size that you specify in the height and width tags</li>
<li>salign=&#8221;tl&#8221; &#8211; this tells the movie to anchor itself to the top left corner instead of centering by default</li>
</ul>
<p>The above tags is how we tell the movie to be a specific size instead of the size set by the stage.</p>
<p>That is a rather long and detailed tutorial, but I hope it is helpful to someone. I will add download links to a completed swf file as well as the Actionscript file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/02/simple-flash-slide-show/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Welcome to LittleArea.com!</title>
		<link>http://www.littlearea.com/2009/02/welcome-to-littleareacom/</link>
		<comments>http://www.littlearea.com/2009/02/welcome-to-littleareacom/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 20:16:05 +0000</pubDate>
		<dc:creator>wayne</dc:creator>
				<category><![CDATA[About LittleArea]]></category>

		<guid isPermaLink="false">http://www.littlearea.com/?p=19</guid>
		<description><![CDATA[Look, it's a brand new blog! What is it about?]]></description>
			<content:encoded><![CDATA[<p>This blog will be primarily about programming, and more specifically, programming for the web. I have a new-found fascination with Flash and Actionscript 3 that will account for a lot of the posts. Hopefully this blog will help me organize some of my random thoughts and projects that I typically start and never finish.<br />
<span id="more-19"></span><br />
Another thing I plan to add is a bunch of flash games for people to play. Unlike many portals, I plan to only add games of quality. Quality comes in many forms, be it amazing graphics or a completely new concept to gaming. I won&#8217;t be adding anything that isn&#8217;t in some way fun for the people playing (subject to my own opinions).</p>
<p>Time for a disclaimer&#8230;<br />
I do not consider myself an expert in this subject, as I am still learning what the capabilities are for the different technologies available. Everyone can always learn something new about anything. There is always more than one way to tackle a problem and my way may not the best or fastest, but it is how I accomplished the end result.</p>
<p>That being said, please feel free to comment and share your prospective, but please keep it constructive and civil so we can all learn from the community.</p>
<p>As for the content and the output of the projects posted on this site, everything (unless explicitly noted) is free to use as-is with the exception to the games*. All source code can be modified, changed and hacked in any way. Use these files and source at your own risk, as I will not take any responsibility for anything that happens to your site from anything downloaded from this site.</p>
<p>I hope you enjoy the site and find some useful information.</p>
<p>*All of the games posted on this site are property of the respective owner. Many of the games will not be created by myself, so please respect the rights of those that have created them for our enjoyment.</p>
 <script type="text/javascript"><!--
google_ad_client = "pub-5361496744802742";
/* small links (horizontal) */
google_ad_slot = "2678465739";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://www.littlearea.com/2009/02/welcome-to-littleareacom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
