<?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; ActionScript3</title>
	<atom:link href="http://www.mclelun.com/blog/tag/actionscript3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mclelun.com/blog</link>
	<description>Design + Programming = Multitask</description>
	<lastBuildDate>Thu, 26 Aug 2010 15:00:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>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><img src="http://www.mclelun.com/img/blog/100630_flex_h.gif" alt="" /></p>
<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>
		<item>
		<title>Life&#8217;s a Game: Live Borderless</title>
		<link>http://www.mclelun.com/blog/2010/04/lifes-a-game-live-borderless/</link>
		<comments>http://www.mclelun.com/blog/2010/04/lifes-a-game-live-borderless/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:45:19 +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/2010/04/lifes-a-game-live-borderless/</guid>
		<description><![CDATA[LG Malaysia is hosting a web based casual game development contest two months ago. I was thinking to participate but was always hold back by office works. I never did anything major until one of my friend message me. Ben, a game designer asked me about the progress on my game. I told him my [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mclelun.com/img/blog/100405_lggame_h.gif" alt="Life's a Game" /></p>
<p>LG Malaysia is hosting a web based casual game development contest two months ago. I was thinking to participate but was always hold back by office works. I never did anything major until one of my friend message me.</p>
<p><span id="more-20"></span></p>
<p>Ben, a game designer asked me about the progress on my game. I told him my situation and we decide to join forces for this project. We also manage to grab another friend, Adrian (game designer) to the team.</p>
<p>Everything seems to be good after the team is build but there is only one minor problem. We start late and just have like two weeks to work on the game before deadline. So, we meet up on one Sunday afternoon to brainstorm about game design, art styles and lock down all major decisions. After that, all communications were done online via messenger, and emails.</p>
<h3>Game Introduction</h3>
<p>Our game is known as &#8220;Life&#8217;s a Game: Live Borderless&#8221;, which is designed based on LG&#8217;s &#8220;Life&#8217;s Good&#8221; tagline.  It is a mash-up of quick &#038; whimsical mini-games depicting everyday life. On a side note, we only have this game title on the last day before submission.</p>
<p><img src="http://www.mclelun.com/img/blog/100405_lggame_01.gif" alt="Life's a Game" /></p>
<h3>Pixel Art</h3>
<p>One of the issues while developing this game is deciding the art direction . Three of us in the team have different art style. If I forced both of my friends to follow my art style, I think the final work would not look good, as different people have different drawing stroke. So, we decide to go for pixel art since it is easier to imitate each other work in pixel art. More over, pixel art give a nostalgia feel of old console games.</p>
<p><img src="http://www.mclelun.com/img/blog/100405_lggame_02.gif" alt="Life's a Game" /></p>
<h3>Game Play</h3>
<p>When I first read about this competition, the first idea that came into my mind is to develop a game base on  LG&#8217;s &#8220;Life&#8217;s Good&#8221; tagline. And the most obvious way is to develop a game base on everyday life. Ideally, we want to have lots of mini games base on daily life activities. But due to time constraint, we lock the number down to 17 mini games/levels in this Flash game. Most of level is quite straight forward and simple in game play. For example, you need to shave your facial hair by clicking left mouse button for the level show in the image below.</p>
<p><img src="http://www.mclelun.com/img/blog/100405_lggame_03.gif" alt="Life's a Game" /></p>
<h3>Popular References</h3>
<p>We also include some popular references in certain levels such as Revoltech, Danboard, classic batman &#038; robin. For the level show in the image below, there are Mario and Luigi poster at the wall.</p>
<p><img src="http://www.mclelun.com/img/blog/100405_lggame_04.gif" alt="Life's a Game" /></p>
<h3>Easter Eggs</h3>
<p>During final hour of development, we decide to include &#8220;easter egg&#8221; in some of the levels. In our game, &#8220;easter egg&#8221; are just hidden easter eggs. You can collect these eggs by clicking on them and it would trigger a slightly different ending if certain amount of eggs is collected.</p>
<blockquote><p>A virtual Easter egg is an intentional hidden message, in-joke or feature in an object such as a movie, book, CD, DVD, computer program, web page or video game. &#8211; wiki</p></blockquote>
<p><img src="http://www.mclelun.com/img/blog/100405_lggame_05.gif" alt="Life's a Game" /></p>
<h3>Wisdom Quotes</h3>
<p>Another thing we decide to put into game during the last minute is the wisdom quotes scene. When the game ends, a wise old owl will tell the player some wisdom quotes from famous people base on their grades. Initially, we were only using quotes from famous real life peoples such as world leaders and politicians. But we found out certain quotes from cartoon characters is quite good as well, so we decide included them too.</p>
<p><img src="http://www.mclelun.com/img/blog/100405_lggame_06.gif" alt="Life's a Game" /></p>
<h3>Play The Game</h3>
<p>You can play the game by visiting the link below. If you love the game, please vote for us. Click on &#8220;Launch Game&#8221; button on that site will open a pop up containing the game. If you didn&#8217;t see anything after clicking the button. It is most likely the browser is blocking the pop up.</p>
<p><a href="http://www.lgborderless.com.my/contest/view.php?gallery_id=16" target="_blank">Life&#8217;s a Game: Live Borderless</a> &#8211; 612KB</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2010/04/lifes-a-game-live-borderless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refactoring Lost</title>
		<link>http://www.mclelun.com/blog/2010/02/refactoring-lost/</link>
		<comments>http://www.mclelun.com/blog/2010/02/refactoring-lost/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:21:46 +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[Illustration]]></category>

		<guid isPermaLink="false">http://www.mclelun.com/blog/?p=17</guid>
		<description><![CDATA[I didn&#8217;t go to office today and I was staying at home to have some rest. But I don&#8217;t really like to spend my whole day by just sleeping and did nothing. So, I dig up an old Flash project that I had long neglected and continue to work on it. This Flash project is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mclelun.com/lost/" target="_blank"><img src="http://www.mclelun.com/img/blog/100208_as3lost_h.gif" alt="lost"/></a></p>
<p>I didn&#8217;t go to office today and I was staying at home to have some rest. But I don&#8217;t really like to spend my whole day by just sleeping and did nothing. So, I dig up an old Flash project that I had long neglected and continue to work on it.</p>
<p><span id="more-17"></span></p>
<p>This Flash project is actually a conversion of my &#8220;Lost&#8221; Flash from AS2 to AS3. Originally, the AS2 &#8220;Lost&#8221; Flash was based on a wallpaper design that I did for an art event during 2007. One of my friends saw the wallpaper design and told me that the idea could be implement into a simple website. So, I took up the challenge and make it into a simple yet interesting website (at least in my opinion).</p>
<p><a href="http://fc00.deviantart.net/fs23/i/2007/313/1/4/Lost_by_mclelun.jpg" rel="lightbox" title="Doodle: Lost"><img src="http://www.mclelun.com/img/blog/100208_as3lost_00.jpg" title="" alt="" /></a></p>
<p>Not long after I complete the AS2 version of this Flash, I go through the scripting again and saw how ugly the script was. Although the ugly code is not &#8220;visible&#8221; to the end user/visitors of my site, but the extensibility is very bad. It was quite hard to add in new features later on.</p>
<p>Being a person that obsessed with &#8220;clean&#8221; code, I start refactoring the code during 2008. Half way through the process, I realize I might as well completely re-write the script in AS3 OOP. But my AS3 OOP was quite bad back then, so the progress is snail pace and the project got stuck after a while.</p>
<p>Time flies and today is 2010. I finally finish converting this damn thing from AS2 to AS3 after sitting in front of my PC one whole day. Most of the half baked script had been dump and re-written. I also manage to add in a few new features along the way.</p>
<h3>Multiple Objects</h3>
<p>The AS2 version was just one single character. But now I could spawn multiple objects into this &#8220;Lost&#8221; Flash by just changing a parameter, thanks to good use of OOP object class. I could even take this class file and reuse it in another project. I never understand that OOP &#8220;reusability until recently. That&#8217;s the problem with the education system here, the lecturer ask you memorize &#8220;The benefits of OOP programming&#8221;, instead of teaching you how to code in OOP.</p>
<p><img src="http://www.mclelun.com/img/blog/100208_as3lost_01.jpg" alt="lost wallpaper"/></p>
<h3>Updated Guestbook</h3>
<p>I also manage to update the guestbook system. Visitor can now make star constellation when they leave their comments. </p>
<p><img src="http://www.mclelun.com/img/blog/100208_as3lost_02.jpg" alt="lost wallpaper"/></p>
<p>Visit this <a href="http://www.mclelun.com/lost/">page </a>to view the updated version and sign my guestbook. I hope there is no serious bug in this version. =)</p>
<h3>Download</h3>
<p><a href="http://www.mclelun.com/lost/">View the Flash!</a><br />
<a href="http://mclelun.deviantart.com/art/Lost-69432721">Lost Wallpaper 1 Deviant page</a><br />
<a href="http://mclelun.deviantart.com/art/Lost-2-69432888">Lost Wallpaper 2 Deviant page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mclelun.com/blog/2010/02/refactoring-lost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
