<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mclelun &#187; Flash</title>
	<atom:link href="http://www.mclelun.com/blog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mclelun.com/blog</link>
	<description>I am a colorblind multimedia designer + developer</description>
	<lastBuildDate>Tue, 31 Jan 2012 14:36:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mahjong Memory Game</title>
		<link>http://www.mclelun.com/blog/2012/01/mahjong-memory-game/</link>
		<comments>http://www.mclelun.com/blog/2012/01/mahjong-memory-game/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 06:59:32 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Art and Design]]></category>
		<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Pixel]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=245</guid>
		<description><![CDATA[I have an idea to develop this memory game after watching a variety show on TV few weeks ago. It is a simple game, where you click on the numbers in ascending order. Game Art As it is Chinese New Year right now, I decide to develop this game with new year festive theme, and [...]]]></description>
			<content:encoded><![CDATA[<p>I have an idea to develop this memory game after watching a variety show on TV few weeks ago. It is a simple game, where you click on the numbers in ascending order.</p>
<p><span id="more-245"></span></p>
<h3>Game Art</h3>
<p>As it is Chinese New Year right now, I decide to develop this game with new year festive theme, and using Mahjong as the puzzle tiles. If you are not familiar with Mahjong, you can use to the image below as a quick reference.</p>
<p><img src="http://www.mclelun.com/img/blog/120129_memnum_02.gif" alt="mah jong" /></p>
<p>The Mahjong tile pattern was originally draw by Jerry Crimson Mann. But I need a 3D rotating Mahjong tile for my game, so I quickly model a low poly Mahjong in Blender and render the rotation sequence. Then, some final touch up was done in Photoshop to give it a pixel art feel.</p>
<p><img src="http://www.mclelun.com/img/blog/120129_memnum_03.gif" alt="mah jong" /></p>
<h3>Play The Game</h3>
<p>A sequence of numbers will be shown for a brief seconds. Remember it and click them in ascending order. You can play “<a href="http://www.mclelun.com/labs/#as3memnum" title="Mahjong Memory Game" target="_blank">Mahjong Memory Game</a>” in my labs page.</p>
<p><a href="http://www.mclelun.com/labs/#as3memnum" title="Mahjong Memory Game" target="_blank"><img src="http://www.mclelun.com/img/blog/120129_memnum_01.gif" alt="mahjong memory game" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2012/01/mahjong-memory-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash XML RPG Dialogue</title>
		<link>http://www.mclelun.com/blog/2011/10/flash-xml-rpg-dialogue/</link>
		<comments>http://www.mclelun.com/blog/2011/10/flash-xml-rpg-dialogue/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 06:50:37 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Pixel]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=236</guid>
		<description><![CDATA[I always have this idea of developing a RPG dialogue system using XML, because I believe it will cut down development time if it is implement correctly. For example, the quest/dialogue can be update by game designers while the programmers can spend their time on other features. It can also use for localization purpose as [...]]]></description>
			<content:encoded><![CDATA[<p>I always have this idea of developing a RPG dialogue system using XML, because I believe it will cut down development time if it is implement correctly. For example, the quest/dialogue can be update by game designers while the programmers can spend their time on other features. It can also use for localization purpose as well.</p>
<p><span id="more-236"></span></p>
<p>The idea of loading data dynamically is not new in game development. Peoples had been doing it since long time ago with a more sophisticated approach. They develop in-house tool where the user just draw some flow charts, or even implement a scripting interface for the designers to code the quest logic. The Flash I did here is still in early stage and basic.</p>
<h3>View the Flash</h3>
<p>Click on the image to view this basic <a href="http://www.mclelun.com/labs/#as3dialog" title="RPG dialogue" target="_blank">XML RPG dialogue system</a>. Instructions are found on the page. You can view the <a href="http://www.mclelun.com/conlabs/as3dialog/dialog_en.xml" alt="XML Dialogue">XML file here</a>.</p>
<p><a href="http://www.mclelun.com/labs/#as3dialog" title="RPG dialogue" target="_blank"><img src="http://www.mclelun.com/img/blog/111101_xmldialog_01.jpg" alt="Flash RPG" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2011/10/flash-xml-rpg-dialogue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tower of Hanoi Flash FLA Source</title>
		<link>http://www.mclelun.com/blog/2011/07/tower-of-hanoi-flash-fla-source/</link>
		<comments>http://www.mclelun.com/blog/2011/07/tower-of-hanoi-flash-fla-source/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 15:45:24 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=195</guid>
		<description><![CDATA[It had been a while since I did any programming work, so I start up Flash and did this little game known as &#8220;Tower of Hanoi&#8220;. Probably a famous example for programming students. The Tower of Hanoi or Towers of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number [...]]]></description>
			<content:encoded><![CDATA[<p>It had been a while since I did any programming work, so I start up Flash and did this little game known as &#8220;<a href="http://www.mclelun.com/labs/#as3toh" title="Tower of Hanoi">Tower of Hanoi</a>&#8220;. Probably a famous example for programming students.</p>
<p><span id="more-195"></span></p>
<blockquote><p>The Tower of Hanoi or Towers of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another rod.</p></blockquote>
<h3>Game rules</h3>
<p>The description from wiki might sound confusing, but the game is actually quite simple. Let&#8217;s look at the pictures that I quickly draw. The game start with 3 rods, A,B and C. Initially, all disks are stack on rod A, and you have to move all the disk in ascending order on rod C to win.<br />
<img src="http://www.mclelun.com/img/blog/110731_toh_01.gif" alt="tower of hanoi" /></p>
<p>Of course, there are few criteria or rules when moving the disk around. First, only 1 disk can be move at a time. Second, only the top most disk can be move. Third, disk can only be placed on top of a larger disk.</p>
<p><img src="http://www.mclelun.com/img/blog/110731_toh_02.gif" alt="tower of hanoi" /></p>
<h3>Gameplay Programming</h3>
<p>After looking at the game rules, you will find out that how easy the game logic can be script. Use 3 arrays to represent the 3 rods, which contain list of values that represent all the disks. The bigger the disk, the larger the number (or the other way round, depend on how you do the condition statement later). Then, use array/stack PUSH and POP function to &#8220;move the disk around&#8221;. In this case, the PUSH and POP function work exactly like what we want, removing and adding items from the top of the array/stack. Last, just do a condition check to see if a disk can be move on to another rod base on target rod top most disk size. To check the top most disk size, just POP it.</p>
<p><img src="http://www.mclelun.com/img/blog/110731_toh_03.gif" alt="tower of hanoi" /></p>
<h3>Recursive Solution</h3>
<p>The puzzle can be solve by using a recursive function using the following algorithm. Assume N equals to total number of disks.<br />
STEP 1) move DISKS N−1 from A to B.<br />
STEP 2) move DISK N from A to C.<br />
STEP 3) move DISKS N−1 from B to C.</p>
<p><img src="http://www.mclelun.com/img/blog/110731_toh_04.gif" alt="tower of hanoi" /></p>
<h3>Play The Game</h3>
<p>You can play &#8220;<a href="http://www.mclelun.com/labs/#as3toh" title="Tower of Hanoi">Tower of Hanoi</a>&#8221; in my labs page. I have include the recursive puzzle solving function as well.</p>
<p><a href="http://www.mclelun.com/labs/#as3toh" title="Tower of Hanoi" target="_blank"><img src="http://fc09.deviantart.net/fs71/f/2011/306/a/6/tower_of_hanoi_lab_by_mclelun-d4etbju.gif" alt="tower of hanoi flash game" /></a></p>
<h3>Download</h3>
<p>If anyone is interested, here is the Flash CS4 source files. Code might not be most optimized and tidy, but can be a good starting point for your project. This source is without graphics and music.<br />
<a href="http://www.mclelun.com/conlabs/as3toh/as3toh.zip">Tower of Hanoi FLA Source &#8211; 20KB</a></p>
<h3>Reference</h3>
<p><a href="http://en.wikipedia.org/wiki/Tower_of_Hanoi" title="wiki">Tower of Hanoi Wikipedia Entry</a><br />
<a href="http://www.cs.cmu.edu/~cburch/survey/recurse/hanoiimpl.html" title="Recursion">Recursion: Towers of Hanoi</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2011/07/tower-of-hanoi-flash-fla-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Time Lapse</title>
		<link>http://www.mclelun.com/blog/2011/02/flash-time-lapse/</link>
		<comments>http://www.mclelun.com/blog/2011/02/flash-time-lapse/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 19:03:23 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=143</guid>
		<description><![CDATA[It had been a while since I did any scripting project. I think I have to sharpen up my rusty programming skill again so I took an artwork from a short comic I did recently, animate it, write some simple script and voila! Info It is just a simple time lapse effect Flash. The time [...]]]></description>
			<content:encoded><![CDATA[<p>It had been a while since I did any scripting project. I think I have to sharpen up my rusty programming skill again so I took an artwork from a short <a href="http://mclelun.deviantart.com/art/hotdog-195606249" target="_blank">comic</a> I did recently, animate it, write some simple script and voila!</p>
<p><span id="more-143"></span></p>
<h3>Info</h3>
<p>It is just a simple time lapse effect Flash. The time lapse was animate in Flash timeline, and later to be control via ActionScript. On load, it will check the system time on user&#8217;s PC then tween the background to the correct frame. Then, an interval call to check on time passed and change the background.</p>
<p>This Flash might slow down on older PC as there are several things which I believe are quite resource intensive. I used 3 large images for the scrolling background, 2 of them which are 24bit PNG with alpha channel. In static, I believe they won&#8217;t cause any problem, but I remember I did a similar scrolling Flash in my old PC, and the FPS drop slightly. I also use 60fps in Flash settings.</p>
<p><img src="http://www.mclelun.com/img/blog/110202_timelapse_01.jpg" alt="time lapse" /></p>
<p><img src="http://www.mclelun.com/img/blog/110202_timelapse_02.jpg" alt="time lapse" /></p>
<p><img src="http://www.mclelun.com/img/blog/110202_timelapse_03.jpg" alt="time lapse" /></p>
<h3>View the Flash</h3>
<p>Simple instruction can be found on the flash page. The awesome background music is a loop from “Spring Rain” by Bebu Silvetti.<br />
<a href="http://www.mclelun.com/labs/#as3time" target="_blank">View the Flash!</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2011/02/flash-time-lapse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FlashDevelop and Flex</title>
		<link>http://www.mclelun.com/blog/2010/06/flashdevelop-and-flex/</link>
		<comments>http://www.mclelun.com/blog/2010/06/flashdevelop-and-flex/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 17:29:42 +0000</pubDate>
		<dc:creator>mclelun</dc:creator>
				<category><![CDATA[Scripting and Coding]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=35</guid>
		<description><![CDATA[I wrote about how to setup FlashDevelop with Flex Framework last time, but all my old blog entries are taken down when I revamp this site. So, this is just a reblog of the old entry with some minor changes. Hopefully it will be easier to follow this time. Introduction FlashDevelop is an open source [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote about how to setup FlashDevelop with Flex Framework last time, but all my old blog entries are taken down when I revamp this site. So, this is just a reblog of the old entry with some minor changes. Hopefully it will be easier to follow this time.</p>
<p><span id="more-35"></span></p>
<h3>Introduction</h3>
<p>FlashDevelop is an open source script editor which primary use for editing ActionScript (Can be use for XML, HTML, CSS… etc as well). Flex is a free open source framework use for compiling Flash SWF. Both of them are free and open source, so it is good for those who want to learn ActionScript without purchasing Adobe Flash.</p>
<h3>Steps to Setup</h3>
<p>Below is a brief steps on how to setup FlashDevelop with Flex Framework.</p>
<ul>
<li>Download and install <a href="http://www.java.com/en/download/">Java runtime</a>.</li>
<li>Download and install <a href="http://www.flashdevelop.org/community/viewforum.php?f=11">FlashDevelop</a>.</li>
<li>Download and extract <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4">Flex SDK</a>.</li>
<li>Launch FlashDevelop.</li>
<li>Go to <strong>Tools&gt;Program Settings&gt;AS3 Context&gt;Flex SDK Location</strong>. Fill in the location where you extract flex SDK.</li>
<li>Go to<strong> Tools&gt;Program Settings&gt;Flash Viewer&gt;External Player Path</strong>. Fill in the location of the debug Flash player 10. It is include in the flex SDK package in this location <strong>\runtimes\player\10\win.</strong></li>
<li>Done. You can compile flash10 stuff now. Just create a new project, and edit the Main.as in the src folder</li>
</ul>
<h3>Different Flex Framework Version</h3>
<p>You can use different version of Flex Framework for different projects. Just set a custom path in the project properties at</p>
<ul>
<li><strong>Project&gt;Properties&gt;Compiler Options&gt;Custom Path to Flex SDK</strong></li>
</ul>
<p>This will be useful to test if your project got screw with a new Flex SDK release without affecting other projects.</p>
<h3>Using Preloader</h3>
<p>If you want a preloader in your AS3 project, just start a new project and choose &#8220;<strong>AS3 Project with Preloader</strong>&#8220;. You will want to add in your own script inside the &#8220;<strong>progress</strong>&#8221; function. You can check how many percents of content are loaded by using the following script.</p>
<p><code>percent = e.bytesLoaded / e.bytesTotal * 100</code></p>
<h3>Free Adobe Flash Builder 4 Standard</h3>
<p>Actually Adobe is providing free copies of Flash Builder 4 Standard to students, event attendees, and people who are jobless now. You can get your copy in this <a href="http://www.adobe.com/devnet/flex/free/">page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2010/06/flashdevelop-and-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

