<?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"
	>

<channel>
	<title>Its Not Another Gaming Site</title>
	<atom:link href="http://www.itsnags.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.itsnags.com</link>
	<description>Play, Learn, Create!</description>
	<pubDate>Wed, 12 Aug 2009 18:23:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Actionscript 3.0 Basics: Handling Keyboard Events</title>
		<link>http://www.itsnags.com/archives/304</link>
		<comments>http://www.itsnags.com/archives/304#comments</comments>
		<pubDate>Wed, 12 Aug 2009 18:15:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[.as]]></category>

		<category><![CDATA[actionscript 3.0]]></category>

		<category><![CDATA[as3 basics]]></category>

		<category><![CDATA[event handling]]></category>

		<category><![CDATA[fla]]></category>

		<category><![CDATA[input]]></category>

		<category><![CDATA[keyboard]]></category>

		<category><![CDATA[source]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=304</guid>
		<description><![CDATA[<font size = 2>Now as things heat up we begin with keyboard inputs in our little series of actionscript 3 basics tutorials. I guess after a couple more I could start a series named actionscript 3 gaming tutorials. So make sure you read this one through.
</font>]]></description>
			<content:encoded><![CDATA[<p><font size=2><br />
Now that you can create a class(shown <a href="http://www.itsnags.com/archives/286">here</a>) and handle events(as shown <a href="http://www.itsnags.com/archives/298">here</a>). It’s time for some user interaction. Now in this tutorial I’ll be showing how to make a simple circular movieclip move around using the arrow keys.</p>
<p>First I created a MovingObject2.fla with the following movieclip:</p>
<p><img src="http://www.itsnags.com/zips/tut2.jpg" alt="movieClip" /></p>
<p>Then I created a MovingObject2.as and inserted the following code in it:</p>
<div class="igBar"><span id="lactionscript-1"><a href="#" onclick="javascript:showCodeTxt('actionscript-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="actionscript-1">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.*;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.*;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MovingObject2 <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> hero1:hero = <span style="color: #000000; font-weight: bold;">new</span> hero<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> speed:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> ldown:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> rdown:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> udown:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> ddown:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MovingObject2<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">x</span>=<span style="color: #cc66cc;color:#800000;">275</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;color:#800000;">200</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>hero1<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, keydown<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_UP</span>, keyup<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, moveHero<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> keydown<span style="color: #66cc66;">&#40;</span>event:KeyboardEvent<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span>==<span style="color: #cc66cc;color:#800000;">37</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ldown=<span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span> == <span style="color: #cc66cc;color:#800000;">39</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rdown=<span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span> == <span style="color: #cc66cc;color:#800000;">38</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udown=<span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span> == <span style="color: #cc66cc;color:#800000;">40</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ddown=<span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> keyup<span style="color: #66cc66;">&#40;</span>event:KeyboardEvent<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span>==<span style="color: #cc66cc;color:#800000;">37</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ldown=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span> == <span style="color: #cc66cc;color:#800000;">39</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rdown=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span> == <span style="color: #cc66cc;color:#800000;">38</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udown=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">keyCode</span> == <span style="color: #cc66cc;color:#800000;">40</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ddown=<span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> moveHero<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ldown<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">x</span>-=speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>rdown<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">x</span>+=speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>udown<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">y</span>-=speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ddown<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">y</span>+=speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now let me explain the code:</p>
<p>By now you are familiar with the import statements so I’ll directly jump into the class MovingObject2:</p>
<p><b>LINE5:</b> Creates a new movieclip hero1 of type ‘hero’.<br />
<b>LINE6:</b> Defines the speed of movement used throughout this tutorial.<br />
<b>LINE7-10:</b> Define Boolean variables that hold the state of the arrow keys (True if pressed and false if not pressed)<br />
<b>LINE11:</b> The Constructor function for MovingObject2 class.<br />
<b>LINE12-14:</b> Adding the movieclip hero1 to the stage at defined x and y co-ordinates.<br />
<b>LINE15-17:</b> Adding three event listeners, one for the event of a key press, another for an event of key release and the third that triggers everytime an enter-frame occurs.<br />
<b>LINE19:</b> Defines the function to be executed when a key press event is detected.<br />
<b>LINE20-27:</b> Inserts a true value to the Boolean variables according to which keys are pressed.<br />
<b>LINE30:</b> Defines the function to be executed when a key release event is detected.<br />
<b>LINE31-38:</b> Inserts a true value to the Boolean variables according to which keys are NOT pressed.<br />
<b>LINE41:</b> Defines the function that executes on every enter-frame.<br />
<b>LINE42-52:</b> Adjust the co-ordinates of hero1 according to what keys are pressed.</p>
<p>Here is what the result looks like:</p>
<p><object width="550" height="400"><param name="movie" value="http://www.itsnags.com/swfs/MovingObject2.swf"><embed src="http://www.itsnags.com/swfs/MovingObject2.swf" width="550" height="400"></embed></object></p>
<p>I guess the most important parts of this tutorial are knowing the keywords like <b>“event.keyCode”, “KeyboardEvent.KEY_DOWN”</b> and <b>“KeyboardEvent.KEY_UP”</b></p>
<p>I hope this helped. In the next tutorial I’ll be taking up a little more advanced topic. You may download the source files for this tutorial <a href="http://www.itsnags.com/zips/as3tut3.zip">here</a>.<br />
</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for Actionscript 3.0 Basics: Handling Keyboard Events" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+Actionscript+3.0+Basics:+Handling+Keyboard+Events" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/304/feed</wfw:commentRss>
		</item>
		<item>
		<title>Actionscript 3.0 Basics: Handling Events</title>
		<link>http://www.itsnags.com/archives/298</link>
		<comments>http://www.itsnags.com/archives/298#comments</comments>
		<pubDate>Thu, 06 Aug 2009 20:56:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[.as]]></category>

		<category><![CDATA[actionscript 3.0]]></category>

		<category><![CDATA[as3 basics]]></category>

		<category><![CDATA[event handling]]></category>

		<category><![CDATA[fla]]></category>

		<category><![CDATA[source]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=298</guid>
		<description><![CDATA[<font size = 2>Continuing with my series of AS3 basics tutorials, here's the newest and one of the most important ones in the field of interactive entertainment, The event handling. I've tried to keep it as simple as it could get.
</font>]]></description>
			<content:encoded><![CDATA[<p><font size=2><br />
	Okay, so now let’s follow up from where we left off. A couple of weeks ago I wrote about working with classes. Now I’ll move on to one of the very important parts of actionscript, ie. handling events. An event is basically any activity that can cause flash to respond by calling some part of code into action.</p>
<p>	Now, I’ll continue to work with classes and use something called an “addEventListener” into the code to handle events. While working on this, if you do not follow the exact steps that I’ve done(or follow some other steps that work <img src='http://www.itsnags.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) you will come across various errors. Since I came across these errors while working on this tutorial I’ll be posting a section at the end of this tutorial that will cover the three most frequent errors that I got while making this and how to get rid of them.</p>
<p>	Okay, for starters we need a .fla file, I’ve named mine as “MovingObject.fla”. Inside this flash file we need to create a single movie clip called “hero” with the following attributes:</p>
<p><img src="http://www.itsnags.com/zips/tut2.jpg" alt="movieClip" /></p>
<p>Now, we will use this flash file along with a class file “MovingObject.as”. For those of you who are not familiar with how to work on class files, you can check out the tutorial <a href="http://www.itsnags.com/archives/286">here</a>. Do not forget to link your .as file to your .fla file.</p>
<p>	Since we are using a .as file we’ll need to write some code into it. So here goes:</p>
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showCodeTxt('actionscript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="actionscript-2">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.*;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.*;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MovingObject <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> hero1:hero = <span style="color: #000000; font-weight: bold;">new</span> hero<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> speed:<span style="color: #0066CC;">int</span>= <span style="color: #cc66cc;color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MovingObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">x</span>=<span style="color: #cc66cc;color:#800000;">275</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">y</span>=<span style="color: #cc66cc;color:#800000;">200</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>hero1<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, moveHero<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> moveHero<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hero1.<span style="color: #006600;">x</span>+=speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>hero1.<span style="color: #006600;">x</span>&gt;=<span style="color: #cc66cc;color:#800000;">525</span> || hero1.<span style="color: #006600;">x</span>&lt;=<span style="color: #cc66cc;color:#800000;">25</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; speed=-speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Alrighty, now as usual here’s the explanation of the above code. Pay attention:</p>
<p><b>LINE 1:</b> It declares that this Actionscript file contains a package that defines a class.<br />
<b>LINE 2:</b> Imports a “Library Class” flash.display.* (ie. All functions in flash.display)[If you don’t know what</b> a library class is just <a href="http://www.google.com/search?hl=en&#038;q=what+is+a+library+class&#038;aq=f&#038;oq=&#038;aqi=">google it</a> as usual.<br />
<b>LINE 3:</b> Imports another library class for handling events.<br />
<b>LINE 4:</b> Defines that this class is public ie. It can be accessed by the MovieClip. The name of the class is MovingObject (note: the file must also be saved as MovingObject.as). the “extends MovieClip” part is appended so as to tell flash that this class works in unison with a MovieClip (the root is also a movieclip)<br />
<b>LINE5:</b> Declares a new movieclip “hero1” of type hero<br />
<b>LINE6:</b> Declares a variable speed which has the scope in all functions within the class.<br />
<b>LINE7:</b> Defines the constructor function of the class.<br />
<b>LINE8-9:</b> Specify initial position for “hero1”.<br />
<b>LINE 10:</b> Puts the newly created movieclip in its appropriate position<br />
<b>LINE 11:</b> The prodigal event listener is here: This line basically asks flash to wait for an “On Enter Frame” event, ie. Basically its triggered ‘n’ times a second if your flash movie runs at ‘n’ fps. On being triggered its asked to call a function “moveHero”.<br />
<b>LINE13:</b> Definition of moveHero function.<br />
<b>LINE14-17:</b> Simple logic to movie the hero1 move from end to end of the flash stage.</p>
<p>If you’ve done everything properly, after you save your .as file and compile the .fla file you should see something like this:</p>
<p><object width="550" height="400"><param name="movie" value="http://www.itsnags.com/swfs/MovingObject.swf"><embed src="http://www.itsnags.com/swfs/MovingObject.swf" width="550" height="400"></embed></object></p>
<p>Now lets talk about the common errors you might face:</p>
<p><b>Error 1120: Access of undefined property:</b> You’ll usually get this problem if you are using the hero1.x=123 or such type of statements outside of functions inside a class. Make sure all such statements are inside the class.</p>
<p><b>Error 1046: Type was not found or was not a compile time constant.</b> I got this error for a long time for the word “event” then I finally realized that I had not imported the flash.events class.</p>
<p><b>Error 1180: Call to possibly undefined method:</b> This error was given for the “addEventListener” statement when it was used outside of a function. This and other such statements need to be used inside of a function.</p>
<p>If you wish you can download the source files for this tutorial <a href="http://www.itsnags.com/zips/as3tut2.zip">here</a>. I hope you enjoyed it, more are on the way.</p>
<p></font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for Actionscript 3.0 Basics: Handling Events" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+Actionscript+3.0+Basics:+Handling+Events" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/298/feed</wfw:commentRss>
		</item>
		<item>
		<title>Yoko</title>
		<link>http://www.itsnags.com/archives/295</link>
		<comments>http://www.itsnags.com/archives/295#comments</comments>
		<pubDate>Wed, 29 Jul 2009 19:47:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Featured Games]]></category>

		<category><![CDATA[Charlie]]></category>

		<category><![CDATA[cute]]></category>

		<category><![CDATA[jump&amp;run]]></category>

		<category><![CDATA[mario]]></category>

		<category><![CDATA[platform]]></category>

		<category><![CDATA[platformer]]></category>

		<category><![CDATA[retro]]></category>

		<category><![CDATA[smb]]></category>

		<category><![CDATA[yoshi]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=295</guid>
		<description><![CDATA[<font size=2>Yoko is a platform game in the style of Mario. Run and jump through the levels, collect power ups and try to stay alive.</font>]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="360"><param name="movie" value="http://www.itsnags.com/swfs/july09final.swf"><embed src="http://www.itsnags.com/swfs/july09final.swf" width="480" height="360"></embed></object></p>
<p><font size=2><br />
"Pure Classic" that's all I have to say about Yoko. As soon as I started playing it I was reminded of my childhood days when i used to play Mario all day long on my 8-bit gaming machine for TV. The familiar cling-cling of coins, the age old bouncing on your enemy to kill them style made me nostalgic.</p>
<p>The game is pretty smooth and quite well designed. Although I would have to say it doesn't offer anything overly new. But whatever it does offer has been made flawlessly and I couldn't see any weird graphics or bugs while playing the game (I played for about an hour or so which is good enough for any flash game by my standards).</p>
<p>Yoko is a game that you'd enjoy playing at least once and ofcourse for those platform freaks like me, "once again". I rate it 8/10<br />
</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for Yoko" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+Yoko" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/295/feed</wfw:commentRss>
		</item>
		<item>
		<title>kaban: Sheep</title>
		<link>http://www.itsnags.com/archives/293</link>
		<comments>http://www.itsnags.com/archives/293#comments</comments>
		<pubDate>Mon, 20 Jul 2009 17:52:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Featured Games]]></category>

		<category><![CDATA[amusing]]></category>

		<category><![CDATA[Arcade]]></category>

		<category><![CDATA[boar]]></category>

		<category><![CDATA[collection]]></category>

		<category><![CDATA[flock]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[highscore]]></category>

		<category><![CDATA[kaban]]></category>

		<category><![CDATA[sheep]]></category>

		<category><![CDATA[sheepdog]]></category>

		<category><![CDATA[skill]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=293</guid>
		<description><![CDATA[<font size=2>Ever tried controlling a wild boar to get it to herd sheep? Well its more convincing than a sheepdog, get your boar to bring the flocks home!</font>]]></description>
			<content:encoded><![CDATA[<p><object width="550" height="400"><param name="movie" value="http://www.itsnags.com/swfs/july0920.swf"><embed src="http://www.itsnags.com/swfs/july0920.swf" width="550" height="400"></embed></object></p>
<p><font size=2>Now here's a game with a difference. Have you ever tried to control a boar to run around and shepherd sheep? If not here's your chance. The game allows you to take control of a wild pig much like "pumba" who runs aound to gather sheep and take them to their respective enclosures. </p>
<p>The game has smooth controls, nice powerups and a very farmish feel. The mandolin background score goes really well to the entire sheep-herding concept. Although I wasn't really good at it and it took me 10 minutes to complete the second level alone, the point is I never got bored. Those virtual sheep behave almost like real ones and its really very difficult to get them to go where you want unless you are good at it.</p>
<p>I simply loved the game and the "bleh bleh" of all the sheep. I give this game 9.5 out of 10.<br />
</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for kaban: Sheep" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+kaban:+Sheep" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/293/feed</wfw:commentRss>
		</item>
		<item>
		<title>QrossFire</title>
		<link>http://www.itsnags.com/archives/284</link>
		<comments>http://www.itsnags.com/archives/284#comments</comments>
		<pubDate>Sat, 18 Jul 2009 13:51:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Featured Games]]></category>

		<category><![CDATA[blocks]]></category>

		<category><![CDATA[bowler hat]]></category>

		<category><![CDATA[cascade]]></category>

		<category><![CDATA[casual]]></category>

		<category><![CDATA[color]]></category>

		<category><![CDATA[fast]]></category>

		<category><![CDATA[grid]]></category>

		<category><![CDATA[high scores]]></category>

		<category><![CDATA[leaderboards]]></category>

		<category><![CDATA[match 3]]></category>

		<category><![CDATA[match three]]></category>

		<category><![CDATA[powerups]]></category>

		<category><![CDATA[puzzle]]></category>

		<category><![CDATA[statistics]]></category>

		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=284</guid>
		<description><![CDATA[<font size=2>A fast-paced and eye-catching match 3 puzzle game with exciting power-ups, fast flying blocks, exploding bombs, and beautiful graphics.</font>]]></description>
			<content:encoded><![CDATA[<p><object width="600" height="500"><param name="movie" value="http://www.itsnags.com/swfs/july09_001.swf"><embed src="http://www.itsnags.com/swfs/july09_001.swf" width="600" height="500"></embed></object></p>
<p><font size=2><br />
<b>Review</b><br />
Not your usual puzzle game with colored boxes, QrossFire has something slightly different yet lot more fun to offer. The gameplay is smooth and enrichingly fresh. I loved playing the game for about 4 hours or so before I got bored but HEY!! what more do you ask of a flash game?</p>
<p>One of the key problems I saw with this game was the absence of a goal, sure going to a newer level every now and then is fascinating but after a while it becomes absolutely boring. But still this puzzle game is worth playing atleast once. I give it 7.5/10<br />
<b>Instructions</b><br />
Click a block in the grid to select it. Then, click another block to slide the first to a new position in the same row or column. Create a match with three or more blocks of the same color to earn points. Get even more points by creating bigger matches or matching from longer distances! Too hard or too easy? Change the difficulty on the Settings screen. Alternate control: Click and hold your mouse button down to drag a block to a new position. Match four blocks in a row, and get the BOMB powerup. It explodes in a firey burst, destroying all neighboring elements. It may also start a cascade of exploding bombs across the board! Match five blocks in a row, and get the FLAME powerup. Match it with any two blocks of the same color. The flame burns across the entire row and column, starting a cascade if it hits any bombs, and boosting your score higher and higher. Create a cascade with at least three bombs, and the skull powerup will appear. Match with any two blocks of the same color, and this powerup will start BOMB BLITZ mode. For a short time, a new bomb is created with every match!<br />
</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for QrossFire" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+QrossFire" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/284/feed</wfw:commentRss>
		</item>
		<item>
		<title>Actionscript 3.0 Basics: Working with a class</title>
		<link>http://www.itsnags.com/archives/286</link>
		<comments>http://www.itsnags.com/archives/286#comments</comments>
		<pubDate>Sat, 11 Jul 2009 17:01:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[.as]]></category>

		<category><![CDATA[actionscript 3]]></category>

		<category><![CDATA[as3 basics]]></category>

		<category><![CDATA[class]]></category>

		<category><![CDATA[fla]]></category>

		<category><![CDATA[source]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=286</guid>
		<description><![CDATA[<font size=2>        As you know I decided to start to make my transition from AS 2.0 to AS 3.0. On my way I've decided to cover a series of tutorials about the basics of actionscript 3. I will mostly be using very simple language and it would be easy to follow if you've already worked on AS2, although it shouldn't be too hard if you're just starting to work on flash.
</font>]]></description>
			<content:encoded><![CDATA[<p><font size=2>        As you know I decided to start to make my transition from AS 2.0 to AS 3.0. On my way I've decided to cover a series of tutorials about the basics of actionscript 3. I will mostly be using very simple language and it would be easy to follow if you've already worked on AS2, although it shouldn't be too hard if you're just starting to work on flash.</p>
<p>       The first thing I noticed was that while using AS 3.0 it would be much more preferable and cleaner to put code in separate class files rather than the timeline. So here I’m providing a simple introduction to class files. </p>
<p><b>STEP 1:</b> Go to File->New->Actionscript File</p>
<p><img src="http://www.itsnags.com/zips/tut1_1.jpg"></p>
<p><b>STEP 2:</b> Type the following code into the file. (It will be explained in due time)</p>
<div class="igBar"><span id="lactionscript-3"><a href="#" onclick="javascript:showCodeTxt('actionscript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="actionscript-3">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.*;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.*;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Myfirstclass <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Myfirstclass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> objectVariable1:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; objectVariable1.<span style="color: #0066CC;">text</span> = “Welcome to Classes”;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>objectVariable1<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#1B6632; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Explaination of the above code:</p>
<p><b>LINE 1:</b> It declares that this Actionscript file contains a package that defines a class.<br />
<b>LINE 2:</b> Imports a “Library Class” flash.display.* (ie. All functions in flash.display)[If you don’t know what a library class is just <a href="http://www.google.com/search?hl=en&#038;q=what+is+a+library+class&#038;aq=f&#038;oq=&#038;aqi=">google it.</a>]<br />
<b>LINE 3:</b> Imports another library class for text. We’ve imported these two classes cause in our little program we have inserted some “text” and “displayed” it on the screen.<br />
<b>LINE 4:</b> Defines that this class is public ie. It can be accessed by the MovieClip. The name of the class is Myfirstclass (note: the file must also be saved as Myfirstclass.as). the “extends MovieClip” part is appended so as to tell flash that this class works in unison with a MovieClip (the root is also a movieclip)<br />
<b>LINE5:</b> Defines a new function in the class<br />
<b>LINE6:</b> Declaration of a variable named “objectVariable1” of the type “TextField”<br />
<b>LINE7:</b> Putting the string to be displayed into the textbox.<br />
<b>LINE8:</b> Adding the textbox to the root.</p>
<p><b>STEP 3:</b> Go to File->New->Flash File(actionscript 3.0)</p>
<p><img src="http://www.itsnags.com/zips/tut1_2.jpg"></p>
<p><b>STEP 4:</b> In the properties window change the document class value to “Myfirstclass”</p>
<p><img src="http://www.itsnags.com/zips/tut1_3.jpg"></p>
<p>One compilation the .as file is automatically compiled and the text is shown onto the screen.</p>
<p><object width="550" height="400"><param name="movie" value="http://www.itsnags.com/swfs/Myfirstclass.swf"><embed src="http://www.itsnags.com/swfs/Myfirstclass.swf" width="550" height="400"></embed></object></p>
<p>You can download the source files for this Tutorial <a href="http://www.itsnags.com/zips/Myfirstclass.zip">here.</a><br />
</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for Actionscript 3.0 Basics: Working with a class" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+Actionscript+3.0+Basics:+Working+with+a+class" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/286/feed</wfw:commentRss>
		</item>
		<item>
		<title>AirBorne</title>
		<link>http://www.itsnags.com/archives/278</link>
		<comments>http://www.itsnags.com/archives/278#comments</comments>
		<pubDate>Mon, 22 Jun 2009 07:25:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Featured Games]]></category>

		<category><![CDATA[Action]]></category>

		<category><![CDATA[Arcade]]></category>

		<category><![CDATA[balloons]]></category>

		<category><![CDATA[destroy]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[shoot]]></category>

		<category><![CDATA[shooter]]></category>

		<category><![CDATA[weapon]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=278</guid>
		<description><![CDATA[<font size=2>They fly! Destroy them all ruthlessly! Enemies are cruel and guileful! At your order: hotbrain and coldheart, and even more: draughts of dynamite, mines, bombs and something else! In your hands: high-technological powerful accessible weapon of an antiquity - a manual catapult! All you need is: kill, crush and destroy! Annihilate enemies. Upgrade weapons. Trample enemies. Buy new ammunition. Exterminate enemies. Destroy them more and more and more and more...stop!... though...better don't stop! Let's see what you is fit for! Be the real airborne!</font>]]></description>
			<content:encoded><![CDATA[<p><object width="550" height="500"><param name="movie" value="http://www.itsnags.com/swfs/june09last.swf"><embed src="http://www.itsnags.com/swfs/june09last.swf" width="550" height="500"></embed></object></p>
<p><font size=2>Its a common joke among flash game developers: The element that makes a flash game most successful is the balloon popping sound. Well in that case AirBorne should be one of the most successful games in its genre. The game has the simple concept of a toy catapult. </p>
<p>A lot of balloons come flying out of nowhere and all you need to do is to destroy them using rocks, dynamite, mines and what not. The game glued me to my computer for 1 and a half hour after which I gave up and tried something else. The multiple level system, currency system and the difficulty curve is perfect to have a fun afternoon or just pop some balloons during the lunch break. </p>
<p>In the end: I loved this game and so would you, I give it 9.5/10 </font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for AirBorne" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+AirBorne" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/278/feed</wfw:commentRss>
		</item>
		<item>
		<title>Lucky Roll</title>
		<link>http://www.itsnags.com/archives/276</link>
		<comments>http://www.itsnags.com/archives/276#comments</comments>
		<pubDate>Thu, 04 Jun 2009 01:52:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[In House productions]]></category>

		<category><![CDATA[Casino]]></category>

		<category><![CDATA[Other]]></category>

		<category><![CDATA[puzzles]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=276</guid>
		<description><![CDATA[<font size=2>There are times in every flash developer's life when they're just lying awake in the bed and think, Man!! I should just go create a game tonight. Well Lucky Roll was one such creation. I did it in about 2 hours and rolled it out the next morning. I won't rate it good, I won't rate it bad, but if you like casino style games maybe you'll enjoy it.</font>]]></description>
			<content:encoded><![CDATA[<p><object width="550" height="400"><param name="movie" value="http://www.itsnags.com/swfs/inhousejune0902.swf"><embed src="http://www.itsnags.com/swfs/inhousejune0902.swf" width="550" height="400"></embed></object></p>
<p><font size=2>There are times in every flash developer's life when they're just lying awake in the bed and think, Man!! I should just go create a game tonight. Well Lucky Roll was one such creation. I did it in about 2 hours and rolled it out the next morning. I won't rate it good, I won't rate it bad, but if you like casino style games maybe you'll enjoy it.</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for Lucky Roll" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+Lucky+Roll" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/276/feed</wfw:commentRss>
		</item>
		<item>
		<title>Good Games Vs Great Games</title>
		<link>http://www.itsnags.com/archives/270</link>
		<comments>http://www.itsnags.com/archives/270#comments</comments>
		<pubDate>Wed, 03 Jun 2009 15:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash Developers Guide]]></category>

		<category><![CDATA[create]]></category>

		<category><![CDATA[Developers]]></category>

		<category><![CDATA[games]]></category>

		<category><![CDATA[Guide]]></category>

		<category><![CDATA[how to make good flash games]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=270</guid>
		<description><![CDATA[<font size=2>Christopher Gregorio recently explained on Mochi Forums the difference between "Good" flash games and "Great" flash games. I think he was pretty accurate and this article will help developers making that jump from Good to Great. Great read!! enjoy!!</font>]]></description>
			<content:encoded><![CDATA[<p><font size=2>I read this post on the Mochi Forums by <a href="https://www.mochiads.com/community/profile/Xdragonx10">Christopher Gregorio</a> He mentioned how some developers create good games (around 10k to 500k views) while others go on to create great games(More than a million plays)</p>
<p>Here's how he suggests developers make the jump from making good games to making great games:</p>
<p>What you need:</p>
<p>    * A good knowledge base of ActionScript<br />
    * Either the ability to produce appealing art or the ability to hire someone to make it for you (Doesn't have to be amazing)<br />
    * Time<br />
    * The desire to make a game where you can truly say "I want to play this" when you're finished</p>
<p>If you don't have any of the above making a great game isn't going to happen for you.</p>
<p>Some things to point out:</p>
<p>    * Genre does not matter, a good game can come from anywhere<br />
    * The key to a great game is execution, the original concept only has a slight impact<br />
    * Polish is extremely important, having bugs and loose ends can ruin an otherwise great game<br />
    * Your game should include a lot of content, games made in 1-2 days rarely become massive hits.</p>
<p>Alright, now to actually go through the steps of making a great game -</p>
<p>    * Come up with a concept, copying previously successful base concepts is fine as long as you don't leave too many similarities. Your concept should be more complex than "A Mouse Avoider", make it very detailed. When doing this step I would suggest fully laying everything out (but always leave room for changes). You can also go the "Make it up as I go" approach, but this can often leave you uninspired when you don't see where you're headed. Make sure when the game is finished it has a lot of variety, nobody likes doing the same thing more than few times.<br />
    * Envision the end goal, you need to know that you're going to make this game as good as possible.<br />
    * Start Coding<br />
    * Make/Collect the art, and add it into the game<br />
    * Finish a Prototype<br />
    * Get people to test your game, collect feedback and make changes accordingly<br />
    * Add more content (And by content I mean more unique features that vary the gameplay, not just ways to make the game longer)<br />
    * Have others beta test the game and look at their feedback critically, if you want your game to be great you need them to honestly tell you they enjoy playing your game just as much as other top hits. FGL's FI system is very useful here.<br />
    * Always look at your game and say "How can I make it better", "What can I add", and "What do other games have that I don't" and constantly make changes until your answers are "I can't (be very honest, don't get lazy and say you can't because it would take too long)", "Nothing", and "Nothing" respectively.<br />
    * Balance the game, a good difficulty curve is crucial<br />
    * Polish the game making sure there are no loose ends and adding in little extras (These go a long way).<br />
    * Beta test again, leave no bugs or loose ends<br />
    * Get Sponsored, release the game<br />
    * Smile as you watch you MochiBot climb to millions of plays.</p>
<p>Now the above things will make your game well liked and spread well, but if you want a lot of plays you need to include factors that make the game replayable.</p>
<p>What makes a game replayable-</p>
<p>    * Achievements<br />
    * Level Editor<br />
    * Randomness<br />
    * Lots of content W/ a save system<br />
    * Customization of something</p>
<p>Final note: Good games always fall short somewhere along the list of steps to make a great a game, making great games doesn't require more skill than good games, all you have to do is not try to cut corners.</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for Good Games Vs Great Games" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+Good+Games+Vs+Great+Games" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/270/feed</wfw:commentRss>
		</item>
		<item>
		<title>D-Finder 3</title>
		<link>http://www.itsnags.com/archives/267</link>
		<comments>http://www.itsnags.com/archives/267#comments</comments>
		<pubDate>Wed, 03 Jun 2009 15:25:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Featured Games]]></category>

		<category><![CDATA[differences]]></category>

		<category><![CDATA[find]]></category>

		<category><![CDATA[puzzle]]></category>

		<category><![CDATA[Spot]]></category>

		<guid isPermaLink="false">http://www.itsnags.com/?p=267</guid>
		<description><![CDATA[<font size=2> Difference Finder 3 is a "spot the difference" game that offers nothing new in the genre. But it is a game that has been perfectly executed and I'd surely recommend the average casual gamer to try it out. Definitely worth playing.</font>]]></description>
			<content:encoded><![CDATA[<p><object width="690" height="500"><param name="movie" value="http://www.itsnags.com/swfs/june0902.swf"><embed src="http://www.itsnags.com/swfs/june0902.swf" width="690" height="500"></embed></object></p>
<p><font size=2> This is just another differences game. But it has been executed to "almost" perfection. The art, the sound, the effects are neither too boring nor to flashy. The game itself is perfect for playing fully at least once. I enjoyed the way the developer has included difficulty modes and levels that progressively get a little more fun as you play through difference finder 3.</p>
<p>I enjoyed the game and passed about an hour of my time on this. I would recommend it to the average casual gamer.</p>
<p>I rate it 8/10</font></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sunil.changrani@gmail.com" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Buy Me a Beer for D-Finder 3" /><input type="hidden" name="currency_code" value="" /><input type="hidden" name="amount" value="" /><input type="image" src="http://www.itsnags.com/wp-content/plugins/buy-me-beer/icon_beer.gif" align="left" alt="" title="" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sunil.changrani@gmail.com&amp;currency_code=&amp;amount=&amp;return=&amp;item_name=Buy+Me+a+Beer+for+D-Finder+3" target="paypal">If you liked this post, Buy me some beer (or coffee)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.itsnags.com/archives/267/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
