<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5505441183172745047</id><updated>2012-01-02T18:19:30.282+08:00</updated><category term='AS3 02 - Listening to Keyboard'/><category term='Smack A Lot'/><category term='Zombie Cockroach'/><category term='Smack-A-Lot'/><category term='pinball'/><category term='Flixel'/><category term='stuffs'/><category term='AS3 04 - More About Instances'/><category term='AS3 08 - Shooting Bullets'/><category term='AS3 03 - Instance'/><category term='Zombie'/><category term='AS3 06 - Time based animation'/><category term='AS3 09 - Collision Detection'/><category term='Flash Game'/><category term='AS3 05 - My first interactive ship'/><category term='Flash Develop'/><category term='Flash Scripting'/><category term='Corona'/><category term='A Tribute to Cactaur'/><category term='mini portraits'/><category term='cockroach'/><category term='AS3 07 – Classes'/><category term='AS3 01 - Hello World'/><category term='Monkey'/><category term='FlashPunk'/><category term='Cactuar'/><title type='text'>- WinterGlass - Flash Game Programmer</title><subtitle type='html'>Drawing is an art. We start with a blank piece of paper and end with a masterpiece. Programming however you want it to be, IS NOT AN ART. You start with full commitment and end up half frustrated. :(.. well not always :)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-5022640959944791656</id><published>2011-09-20T21:01:00.015+08:00</published><updated>2011-09-21T09:41:18.490+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pinball'/><category scheme='http://www.blogger.com/atom/ns#' term='Zombie'/><title type='text'>New game release! Zombie VS Pinball!</title><content type='html'>This is a Zombie themed pinball game which uses Box2D library for the physics :D. A tribute to my old pinball days! Hope you guys enjoy it!&lt;br /&gt;&lt;br /&gt;Get all 'ZOMBIE' and the zombie comes to life! :D&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://games.mochiads.com/c/g/zombie-vs-pinball/ZombieVSPinball.swf" width="500" height="500"&gt;&lt;br /&gt;&lt;!---&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ZombieVSPinball" width="500" height="500" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/ZPinball-Final_protected.swf"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="bgcolor" value="#ffffff"&gt;&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://sites.google.com/site/winterglasssite/Home/ZPinball-Final_protected.swf" quality="high" bgcolor="#ffffff" width="500" height="500" name="ZombieVSPinball" align="middle" play="true" loop="false" allowscriptaccess="sameDomain" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;---&gt;&lt;br /&gt;Created in Multimedia Fusion Developer &lt;img src="http://sites.google.com/site/winterglasssite/Home/mmf2-dev.png"/&gt;&lt;br /&gt;Learn all about Multimedia Fusion at &lt;a href="http://www.clickteam.com" target="_new"&gt;www.clickteam.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-5022640959944791656?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/5022640959944791656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=5022640959944791656' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/5022640959944791656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/5022640959944791656'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/09/new-game-release-zombie-vs-pinball.html' title='New game release! Zombie VS Pinball!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7283532846116427418</id><published>2011-07-06T11:37:00.007+08:00</published><updated>2011-07-06T12:08:49.413+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Corona'/><category scheme='http://www.blogger.com/atom/ns#' term='Monkey'/><title type='text'>Corona is my friend...</title><content type='html'>Well like it's title suggested, Corona is my friend. Now what is this corona? It's basically Mobile Development Framework. Currently does &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;iOS&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Android&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Barns &amp; Noble's Nook&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Hmm... now what does this have to do with Flash Game Programming? You can read / download / try ... all about it here &lt;br /&gt;http://www.anscamobile.com/corona&lt;br /&gt;&lt;br /&gt;They even have a Flash Actionscript comparison on that side to help you migrate from Actionscript to LUA. Oh wait... did I mentioned that the codes are in LUA? No? Well everything in Corona is in LUA. Just code once and deploy to iOS, Android and that Nook thingy.&lt;br /&gt;&lt;br /&gt;It comes with &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Emulator for Android&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Emulator for iOS Devices - for Mac version only :(...&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;What it didn't come with is a nice LUA scripting interface but you can find a LUA editor by googling it.&lt;br /&gt;It's &lt;br /&gt;&lt;br /&gt;Does this mean I am leaving the Flash Arena? &lt;br /&gt;...&lt;br /&gt;..&lt;br /&gt;.&lt;br /&gt;Never!!! Well not currently... if you look at my [&lt;a href="http://winterglass.blogspot.com/p/beta-page.html"&gt;BETA&lt;/a&gt;] page you can see I am actually working on a pinball game.... sponsor anyone? Help poor me?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7283532846116427418?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7283532846116427418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7283532846116427418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7283532846116427418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7283532846116427418'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/07/corona-i-my-friend.html' title='Corona is my friend...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-809416407276159797</id><published>2011-03-08T16:52:00.003+08:00</published><updated>2011-03-08T16:56:30.614+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mini portraits'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Game'/><title type='text'>Miniportraits 3</title><content type='html'>Another Miniportriats (3) : Spot the Difference Game for everyone to enjoy! Heard that some did stressed on the difficulty of the levels. Well.. it's a spot the difference game where you have to look real hard :D I thought being black and white should be easier... guess not really true :D Portraits are drawn by "dreamscometrue". You can see his artwork at &lt;a target="_new" href="http://www.silkmark.com/dreamscometrue"&gt;http://www.silkmark.com/dreamscometrue&lt;/a&gt; or at &lt;a target="_new" href="http://powderfactor.deviantart.com"&gt;http://powderfactor.deviantart.com&lt;/a&gt;.. yeah he got a deviantart at last :D Do enjoy...&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="miniportraits3" width="500" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/miniportraits_3.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/miniportraits_3.swf" quality="high" bgcolor="#ffffff" width="500" height="400" name="miniportraits3" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-809416407276159797?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/809416407276159797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=809416407276159797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/809416407276159797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/809416407276159797'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/03/miniportraits-3.html' title='Miniportraits 3'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2591351237420713299</id><published>2011-02-23T17:16:00.007+08:00</published><updated>2011-02-23T17:48:59.431+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flixel'/><title type='text'>Welcome stencyl!</title><content type='html'>Hmm.. I notice I haven't been errr... talking on this blog a lot. Seems more Game Releases this few months than actual blogging.... anyway....&lt;br /&gt;&lt;br /&gt;Lets give a good hand for &lt;a href="http://www.stencyl.com" target="_new"&gt;stencyl&lt;/a&gt;. (Not sure how long has it been around but I just heard about it... wait... it says 2011 at the bottom is the page). &lt;strike&gt;Tried to copy the logo but it aint happening cause I can't see it in the html code... arggg&lt;/strike&gt; What's stencyl and what does it have to do with game programming?&lt;br /&gt;&lt;br /&gt;Well err.. you can read about it at their site or just read below...&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;It helps you make games... flash game.. currently&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It's actually a packaged &lt;b&gt;Flixel&lt;/b&gt; with a very useful and easy user interface to handle game logics... (that's what it looks like in their screen shot... not sure if it's true... yet)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Still blurr? Let me try again....&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It lets you create flash game without coding? No?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;How about it helps non programmers to make flash game!&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Ok.. I am a bit blurr about this until they actually approve me to join their BETA but meanwhile you can try out their games created by their approved &lt;strike&gt;(envied)&lt;/strike&gt; BETA testers.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;PS:Ouch... I noticed my link to the Miniportriats 2 game actually pointed to Miniportraits 1... aww... fixed it :D&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2591351237420713299?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2591351237420713299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2591351237420713299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2591351237420713299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2591351237420713299'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/02/welcome-stencyl.html' title='Welcome stencyl!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-1089874881674449643</id><published>2011-02-16T11:34:00.006+08:00</published><updated>2011-02-16T11:49:17.794+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cockroach'/><category scheme='http://www.blogger.com/atom/ns#' term='Zombie Cockroach'/><category scheme='http://www.blogger.com/atom/ns#' term='Zombie'/><category scheme='http://www.blogger.com/atom/ns#' term='Smack A Lot'/><title type='text'>New Game Release! Smack-A-Lot : Zombie Cockroach!</title><content type='html'>Remember Smack-A-Lot : Zombie? After you manage to smack it real good, zombie falls to the ground and a cockroach starts chewing on it / him / her ... whichever suitable. Thus, Smack-A-Lot : Zombie Cockroach is born!&lt;br /&gt;&lt;br /&gt;With the addition of left and right blocking and a score penalty system, this adds that extra 'annoying feature' into the game. Go for the highscore!&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="smackalot-zombie-cockroach" width="550" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/smackalot-cockroach.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/smackalot-cockroach.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="smackalot-zombie-cockroach" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-1089874881674449643?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/1089874881674449643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=1089874881674449643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1089874881674449643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1089874881674449643'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/02/new-game-release-smack-lot-zombie.html' title='New Game Release! Smack-A-Lot : Zombie Cockroach!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7318801931056861397</id><published>2011-01-04T16:16:00.003+08:00</published><updated>2011-02-23T17:43:46.872+08:00</updated><title type='text'>Miniportraits 2</title><content type='html'>First game of the year! Yet another release of Miniportraits spot the difference game. Portraits are drawn by "dreamscometrue". You can see his artwork at &lt;a target="_new" href="http://www.silkmark.com/dreamscometrue"&gt;http://www.silkmark.com/dreamscometrue&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="miniportraits2" width="500" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/miniportraits_2.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/miniportraits_2.swf" quality="high" bgcolor="#ffffff" width="500" height="400" name="miniportraits2" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7318801931056861397?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7318801931056861397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7318801931056861397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7318801931056861397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7318801931056861397'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/01/miniportraits-2.html' title='Miniportraits 2'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2347504704859080790</id><published>2011-01-03T14:35:00.003+08:00</published><updated>2011-01-03T14:40:53.412+08:00</updated><title type='text'>Happy New Year 2011!</title><content type='html'>Happy New Year everyone... whoever that is reading this post! Let us make this year a wonderful and joyful year! More games to come? You bet!&lt;br /&gt;&lt;br /&gt;Now lets review what happened last year a litle bit. I manage to launch my first online game! Here is the list below!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Smack-A-Lot : Vampire&lt;/b&gt;&lt;br /&gt;The third installment of the Smack-A-Lot series with Vampire this time :D This time the smacked fight back! Use the "S" key to defend against the attack and smack the Vampire to oblivion.&lt;center&gt;&lt;br /&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/smackalot-vampire.jpg"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;center&gt;You can &lt;a href="http://winterglass.blogspot.com/2010/12/new-game-release-smack-lot-vampire.html"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;PLAY&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; it &lt;a href="http://winterglass.blogspot.com/2010/12/new-game-release-smack-lot-vampire.html"&gt;here&lt;/a&gt;.&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mini Portraits : A Game of Difference&lt;/b&gt;&lt;br /&gt;First collaboration project with an old friend artist, this is a simple spot the difference game which features the artist original work in a form of mini portraits sketched and scanned into the digital world! Have fun!&lt;center&gt;&lt;br /&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/miniportraits_screen.jpg"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;center&gt;You can &lt;a href="http://winterglass.blogspot.com/2010/12/mini-portraits-game-of-difference.html"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;PLAY&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; it &lt;a href="http://winterglass.blogspot.com/2010/12/mini-portraits-game-of-difference.html"&gt;here&lt;/a&gt;.&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Smack-A-Lot : Zombie&lt;/b&gt;&lt;br /&gt;A continuation of the Smack-A-Lot series with Zombie smacking action this time around :D A new addition of gameplay has been added... the hyper edition. Can you get the 'UNSTOPABLE!'&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/smack-a-lot-zombie-blogspot.jpg"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;center&gt;You can &lt;a href="http://winterglass.blogspot.com/2010/11/new-game-release-smack-lot-zombie.html"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;PLAY&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; it &lt;a href="http://winterglass.blogspot.com/2010/11/new-game-release-smack-lot-zombie.html"&gt;here&lt;/a&gt;.&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Smack-A-Lot : Piranha&lt;/b&gt;&lt;br /&gt;A simple 2 button game where you smack the piranha left and right before the counter runs out :D&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/thumbnail-a-200.jpg"&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/gameplay01-winter.jpg"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;center&gt;You can &lt;a href="http://winterglass.blogspot.com/2010/10/new-game-release-smack-lot-piranha.html"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;PLAY&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; it &lt;a href="http://winterglass.blogspot.com/2010/10/new-game-release-smack-lot-piranha.html"&gt;here&lt;/a&gt;.&lt;/center&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2347504704859080790?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2347504704859080790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2347504704859080790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2347504704859080790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2347504704859080790'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2011/01/happy-new-year-2011.html' title='Happy New Year 2011!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-4004815044216774377</id><published>2010-12-20T22:05:00.002+08:00</published><updated>2010-12-20T22:18:14.148+08:00</updated><title type='text'>New game release! Smack-A-Lot : Vampire!</title><content type='html'>The next Smack-A-Lot is about Vampire. This time they fight back! Smack them before they smack you! The addition of the defend key "S" makes all the difference between life and dead.&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="smackalot-vampire" width="550" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/smackalot-vampire.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/smackalot-vampire.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="smackalot-vampire" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-4004815044216774377?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/4004815044216774377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=4004815044216774377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/4004815044216774377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/4004815044216774377'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/12/new-game-release-smack-lot-vampire.html' title='New game release! Smack-A-Lot : Vampire!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-1138269886744904721</id><published>2010-12-15T00:07:00.003+08:00</published><updated>2010-12-15T00:13:08.743+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mini portraits'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Game'/><title type='text'>Mini Portraits : A Game of Difference</title><content type='html'>A deviation of gameplay from the previous smacking releases. This time it's a spot the difference game with mini portraits drawn by "dreamscometrue". You can see his artwork at &lt;a target="_new" href="http://www.silkmark.com/dreamscometrue"&gt;http://www.silkmark.com/dreamscometrue&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="miniportraits1" width="500" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/miniportraits_1.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/miniportraits_1.swf" quality="high" bgcolor="#ffffff" width="500" height="400" name="miniportraits1" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-1138269886744904721?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/1138269886744904721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=1138269886744904721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1138269886744904721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1138269886744904721'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/12/mini-portraits-game-of-difference.html' title='Mini Portraits : A Game of Difference'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7132528257554864516</id><published>2010-11-25T22:02:00.003+08:00</published><updated>2010-11-25T22:49:10.491+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Smack-A-Lot'/><title type='text'>New game release! Smack-A-Lot : Zombie!</title><content type='html'>A continuation of the Smack-A-Lot series. This time it's with the Zombie! Play the all new hyper smacking edition and see how long can you last against the undead!&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="smackalot" width="550" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/smackalot-zombie.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/smackalot-zombie.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="smackalot" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7132528257554864516?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7132528257554864516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7132528257554864516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7132528257554864516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7132528257554864516'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/11/new-game-release-smack-lot-zombie.html' title='New game release! Smack-A-Lot : Zombie!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-3171909377909459018</id><published>2010-10-24T16:56:00.006+08:00</published><updated>2010-10-24T17:02:48.078+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Smack-A-Lot'/><title type='text'>New game release! Smack-A-Lot : Piranha Edition!</title><content type='html'>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="smackalot" width="500" height="400" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/smackalot-piranha.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="http://sites.google.com/site/winterglasssite/Home/smackalot-piranha.swf" quality="high" bgcolor="#ffffff" width="500" height="400" name="smackalot" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-3171909377909459018?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/3171909377909459018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=3171909377909459018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3171909377909459018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3171909377909459018'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/10/new-game-release-smack-lot-piranha.html' title='New game release! Smack-A-Lot : Piranha Edition!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2296644078932259706</id><published>2010-10-08T14:51:00.008+08:00</published><updated>2010-10-20T11:33:14.244+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Flash 3D Engines Anyone?</title><content type='html'>Yup been busy lately.. busy playing Starcraft 2 and other stuffs... (not a very good explanation of being busy...)&lt;br /&gt;&lt;br /&gt;Now some of you have already seen and even played with 3D flash games. Ever wonder the 3D engines behind them? How it works? Who writes them? &lt;strike&gt;What were they thinking? What do you mean you have not watch Piranha 3D? Go watch it now!&lt;/strike&gt; Well currently (at time of writing) Flash CS5 does support 3D but in a limited away that you need an engine to be on top of it to ease things out. It's like saying :&lt;br /&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;i&gt;"Yeah C++ can do 3D with OpenGL and DirectX and stuff but then to get moving fast (fast and productive being the operative word here...), people probably work with an already built 3D engine like The Unreal Engine (Unreal), The Crystal Engine (Final Fantasy)..."&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Well, in Flash we have 2 FREE 3D Engines to work with. (popular ones that is)&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://3.bp.blogspot.com/_gbcDMCBsDoA/TK7G7y9HzjI/AAAAAAAAAGc/by4knA-Zb-8/s1600/away3d.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 87px; height: 80px;" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/TK7G7y9HzjI/AAAAAAAAAGc/by4knA-Zb-8/s400/away3d.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5525572523422895666" /&gt;&lt;/a&gt; Away3D (&lt;a href="http://www.away3d.com" target="_new"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://4.bp.blogspot.com/_gbcDMCBsDoA/TK7G8MdnYrI/AAAAAAAAAGk/5Zxq-oD1KyQ/s1600/papervision3d.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 157px; height: 80px;" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/TK7G8MdnYrI/AAAAAAAAAGk/5Zxq-oD1KyQ/s400/papervision3d.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5525572530270069426" /&gt;&lt;/a&gt; Papervision3D (&lt;a href = "http://blog.papervision3d.org" target = "_new"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;You can just download the libraries and plug it into Flash Develop like how you did it with Flixel in my previous tutorials. &lt;br /&gt;&lt;br /&gt;Which one am I using? Well err... not any actually... just browsing along.. moving along but Away3D seems to be pretty easy to get into... no I am not promoting it. Just ignore my previous sentences.. well ignore this whole paragraph but you might want to take a look at a book called &lt;b&gt;"The Essential Guide to 3D in Flash"&lt;/b&gt;. It's easy to follow and though there are errors in the codes, it's easily spottable.. spotable? Is this a word? 'Spotable'? By the way, it's based on Away3D.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://4.bp.blogspot.com/_gbcDMCBsDoA/TK7G8HT3vDI/AAAAAAAAAGs/FXw6iZzhYOg/s1600/3dinflashbook_s.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 238px; height: 300px;" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/TK7G8HT3vDI/AAAAAAAAAGs/FXw6iZzhYOg/s400/3dinflashbook_s.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5525572528887020594" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note : if you are interested, there is this Piranha flick movie called "&lt;b&gt;Mega Piranha&lt;/b&gt;" which is totally awesome in a comedic way.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2296644078932259706?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2296644078932259706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2296644078932259706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2296644078932259706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2296644078932259706'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/10/flash-3d-engines-anyone.html' title='Flash 3D Engines Anyone?'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_gbcDMCBsDoA/TK7G7y9HzjI/AAAAAAAAAGc/by4knA-Zb-8/s72-c/away3d.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-1920866132419376923</id><published>2010-08-31T16:44:00.007+08:00</published><updated>2010-10-20T11:41:08.992+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='A Tribute to Cactaur'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Cactuar'/><title type='text'>A Tribute to Cactaur ('Cactuar' actually)</title><content type='html'>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="http://sites.google.com/site/winterglasssite/Home/timun-swf.swf" width="352" height="264" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;br /&gt;  &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/timun-swf.swf" /&gt;&lt;br /&gt;  &lt;param name="quality" value="high" /&gt;&lt;br /&gt;  &lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;  &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;  &lt;param name="allowFullScreen" value="true" /&gt;&lt;br /&gt;  &lt;embed src="timun-swf.swf" quality="high" bgcolor="#ffffff" width="352" height="264" name="timun-swf" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : Is there a spelling mistake or something cause the last time I played final fantasy...&lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : Yes I know. I got the name wrong... it's supposed to be Cactuar instead of Cactaur but the game has already been done since 2002. The title screen, the conversations... they are all pointing to Cactaur... how embarassing creating a tribute to someone when getting their name wrong :p&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : What is the 'Fire' key? And why?&lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : 'Spacebar'. Because it's easy to press.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : The screen is so small? Wha?&lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : Yes I know again, it was an old game and 352 x 264 is the norm back then.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : Wait a minute I played this before. It was an app by the way... What happened?&lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : Yes I got it port over to swf. Unfortunately not all stuffs got translated.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : What stuffs gone good bye?&lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : The videos especially. I took it out for size sake.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : The game is short... I want more... &lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : Sorry there isn't anymore... the reason I port this is to test it out under flash.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Q&lt;/strong&gt; : Cactuar is supposed to sound more intelligent.&lt;br /&gt;&lt;strong&gt;A&lt;/strong&gt; : Errr? Wait... can I answer saying this is Cactaur and not Cactuar?&lt;br /&gt;&lt;br /&gt;'&lt;strong&gt;A Tribute to Cactaur&lt;/strong&gt;' is a fan game made by me after got stuck in the Final Fantasy universe back in the early y2k with &lt;a  href="http://www.clickteam.com" target="_new"&gt;Clickteam&lt;/a&gt; products. It was released as a tribute to Cactuar (yes I got the name right!) along with Twin Bee characters in 2002 :D&lt;br /&gt;&lt;br /&gt;The original release has midi music from the twin bee series but flash does not support midi so it was taken out.&lt;br /&gt;The porting includes replacing all pictures from bitmap (bmp) to either jpegs (jpg) or png (whichever is smaller). Unfortunately it still compiles to a massive 3 MB swf files... &lt;strike&gt;err I will look into it&lt;/strike&gt; The original also had a pre-rendered 3D cactuar :D&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Take a look at Clickteam's excellent &lt;a href="http://www.clickteam.com" target="_new"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 32px; height: 32px;" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/TL5kYzGb3iI/AAAAAAAAAG0/DK3Ln6FuVhQ/s400/mmf32.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5529967769654386210" /&gt;&lt;/a&gt; Multimedia Fusion 2&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-1920866132419376923?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/1920866132419376923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=1920866132419376923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1920866132419376923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1920866132419376923'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/08/tribute-to-cactaur-cactuar-actually.html' title='A Tribute to Cactaur (&apos;Cactuar&apos; actually)'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_gbcDMCBsDoA/TL5kYzGb3iI/AAAAAAAAAG0/DK3Ln6FuVhQ/s72-c/mmf32.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2930592669559370542</id><published>2010-08-28T20:13:00.000+08:00</published><updated>2010-08-28T20:13:00.488+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>A simple A-Star pathfinding in Flash</title><content type='html'>Been trying to come out with a prototype of what this pathfinding A* (Pronounced A Star) was all about ever since my &lt;a href="http://winterglass.blogspot.com/2010/04/pathfinding-what-is-it.html"&gt;previous post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Reffering to &lt;a href="http://www.policyalmanac.org/games/aStarTutorial.htm"&gt;http://www.policyalmanac.org/games/aStarTutorial.htm&lt;/a&gt;, which is a good explanation of the topic along with nice pictures of the pathfinding algorithm in progress, I have managed to come out with this...&lt;br /&gt;&lt;br /&gt; &lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="500" height="400" id="AS3-09" align="middle"&gt;&lt;br /&gt; &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt; &lt;param name="allowFullScreen" value="false" /&gt;&lt;br /&gt; &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/A-Star.swf" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="bgcolor" value="#ffffff" /&gt; &lt;embed src="AS3-09.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="AS3-09" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" &gt;&lt;/embed&gt;&lt;br /&gt; &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Go ahead click on it. It should find a path from the blue box to the rather darker blue box.&lt;br /&gt;&lt;br /&gt;Sometimes pictures are worth a thousand words.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2930592669559370542?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2930592669559370542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2930592669559370542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2930592669559370542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2930592669559370542'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/08/simple-star-pathfinding-in-flash.html' title='A simple A-Star pathfinding in Flash'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-1258186351779327786</id><published>2010-08-20T14:03:00.014+08:00</published><updated>2010-08-20T16:15:08.666+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Develop'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Flixel'/><title type='text'>Keyboards with Flixel.. my moving ship.</title><content type='html'>Okay.. we will be continuing from the previous tutorial of &lt;strike&gt;clowness&lt;/strike&gt; clownship. Now where were we? Ahh.. lets see.... we have the ship on screen (Better read the previous tutorial if you are a bit on the blurr side.... &lt;a href="http://winterglass.blogspot.com/2010/06/of-bitmaps-and-sprites-in-flixel.html"&gt;Previous Tutorial&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;On this tutorial what we are gonna achieve is : &lt;br /&gt;&lt;br /&gt;- &lt;strike&gt;Import bitmap into the game&lt;/strike&gt; &lt;i&gt;Done&lt;/i&gt;&lt;br /&gt;- &lt;strike&gt;Add the imported bitmap as a sprite to the game&lt;/strike&gt; &lt;i&gt;Done&lt;/i&gt;&lt;br /&gt;- Extend the clownship class (Adds more functionality to the Clownship class)&lt;br /&gt;- Taking care of keyboard presses&lt;br /&gt;- Introduction to movement&lt;br /&gt;- Checking for boundaries so that our ship does not go beyond the viewable area&lt;br /&gt;&lt;br /&gt;Meanwhile flash has moved to CS6 ... nah not yet as far as I know... still stuck with CS5. Anyway we are using Flash Develop so the only concern is the Flex SDK ... really... no really... really really...&lt;br /&gt;&lt;br /&gt;Back to the codes... your directory should look as below.&lt;br /&gt;&lt;br /&gt;&lt;img style="WIDTH: 181px; HEIGHT: 167px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5460539768001485186" border="0" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/S8e7_OGfWYI/AAAAAAAAAF0/A9ZnHHgOA1w/s400/03.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Note the 3 files... &lt;br /&gt;&lt;br /&gt;1. ClownShip.as&lt;br /&gt;2. LoadMeShip.as&lt;br /&gt;3. Main.as&lt;br /&gt;&lt;br /&gt;The Main.as sets up the entire flash player and calls LoadMeShip.as.&lt;br /&gt;LoadMeShip.as then creates a new ClownShip instance called cship.&lt;br /&gt;&lt;br /&gt;Below is the code for Main.as&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package &lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;import org.flixel.*;&lt;br /&gt;&lt;br /&gt; public class ClownShip extends FlxSprite&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;  [Embed(source = "data/clownship.png")] private var ImgShip:Class;&lt;br /&gt;&lt;br /&gt;  public function ClownShip()&lt;br /&gt;  {&lt;br /&gt;   loadGraphic(ImgShip);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Yet again the code for LoadMeShip.as&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package&lt;br /&gt;{&lt;br /&gt; import org.flixel.FlxState;&lt;br /&gt; &lt;br /&gt; public class LoadMeShip extends FlxState&lt;br /&gt; {&lt;br /&gt;  private var cShip:ClownShip;&lt;br /&gt;  &lt;br /&gt;  public function LoadMeShip():void&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;   cShip = new ClownShip(100, 100);&lt;br /&gt;   add(cShip);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Wait a minute... it's not the same as the previous example... what's with the cShip = new ClownShip(100,100);&lt;br /&gt;It was cShip = new ClownShip(); before.&lt;br /&gt;&lt;br /&gt;Well my furry friend, let me introduce you to these things called parameters... what we are doing here is passing in 100 and 100 again as parameter &lt;strike&gt;numero uno&lt;/strike&gt; no 1 and no 2 to the ClownShip. This also means that our previous ClownShip.as has to be modified to accept and use those parameters.&lt;br /&gt;&lt;br /&gt;It's like when you get an &lt;strike&gt;aiskrim&lt;/strike&gt; icecream for free you don't pass any money to the seller. The seller don't even need to count the money... but when you purchase the icecream with money, the seller has to have the ability to count the money.&lt;strike&gt;... whatever... what kind of sick example is this? &lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;The entry point (constructor) to the ClownShip.as class is the function which has the similar name to the class name.&lt;br /&gt;Previously &lt;strike&gt;on X-Files&lt;/strike&gt; we have ...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;public function ClownShip()&lt;br /&gt;  {   &lt;br /&gt; loadGraphic(ImgShip);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;as the entry point (constructor... get used to the term constructor cause this is widely used by people that talks funny...)&lt;br /&gt;&lt;br /&gt;To make it able to accept parameters we need to add it in the function declaration...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;public function ClownShip(x:int)&lt;br /&gt;  {   &lt;br /&gt; loadGraphic(ImgShip);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note the x:int. This means accepting 1 parameter named x of type integer (32-bit signed integer). Yes you need to declare what kind of parameter this &lt;strike&gt;bozo&lt;/strike&gt; constructor is accepting. But wait... there are 2 of them.. 2 jedi knights? Now there are 2 of them!&lt;br /&gt;So us having a higher plain of intelligence will quickly deduced that the constructor should look like this...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;public function ClownShip(x:int,y:int)&lt;br /&gt;  {   &lt;br /&gt; loadGraphic(ImgShip);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Get it? I do hope you do. Now loadGraphic has been explained &lt;strike&gt;about a million times&lt;/strike&gt; in the previous tutorial so I am not gonna go into that.&lt;br /&gt;&lt;br /&gt;Ok now you can accept 2 parameters into the constructor, now what? The 2 parameters from cShip = new ClownShip(100, 100); is actually the X and Y coordinates where we want the ClownShip to appear, so within the ClownShip main function we call "super(x, y);". It should now look like this...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;public function ClownShip(x:int,y:int)&lt;br /&gt;  {   &lt;br /&gt; super(x, y);&lt;br /&gt; loadGraphic(ImgShip);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Wha? super? What the? Ok I think we need some words about the "super" function.&lt;br /&gt;Here goes... &lt;br /&gt;&lt;br /&gt;&lt;strike&gt;Long ago in a galaxy far far away.. the hope of freedom ..&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Now which class was ClownShip extended (derived) from? Any answers? Yes.. the FlxSprite class... (from the "public class ClownShip extends FlxSprite") so whenever we call "super&lt;strike&gt;man&lt;/strike&gt;", it simply means that we are calling the superclass's constructor...&lt;br /&gt;...&lt;br /&gt;..&lt;br /&gt;.&lt;br /&gt;which in this case is the constructor function of FlxSprite, which is &lt;br /&gt;&lt;br /&gt;"public function FlxSprite(X:Number = 0, Y:Number = 0, SimpleGraphic:Class = null)" from the FlxSprite.as file.&lt;br /&gt;&lt;br /&gt;No don't look into the FlxSprite.as... just look into the documentation that comes with Flixel. From there you will also find out that the first and second parameter passed into the super corresponded with the X and Y coordinate of the created instance. &lt;br /&gt;&lt;br /&gt;Okay so now "super" simply means referring to the parents (extended from) object. You can even call the parents object's function / method ... lets say you wanna call the "update" function from FlxSprite.. you can simply call "super.update();" which you are gonna use in the near future. :D&lt;br /&gt;&lt;br /&gt;So I hope you pretty much get the idea of "super". &lt;strike&gt;While "duper" simply means calling the grand...&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to add a function which Flixel calls each game loop, &lt;strike&gt;the ultimate most important function of them all&lt;/strike&gt; the "update" function. Now if you look into the FlxSprite there is already an update function which has been inherited into the ClownShip.as class so why do we need to add it somemore?&lt;br /&gt;&lt;br /&gt;You are right.. it has already been inherited but then we wanna modified that update function to add in listeners for keyboard strokes so we want to override it's parents update function. How are we gonna do this? Well we use override...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;override public function update():void {&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What this means now is whenever Flixel calls the update for the ClownShip... it totally ignores the one it inherited from the FlxSprite and goes straight into the overrided one above. Overrided? Is this even a word? &lt;strike&gt;Should it be overrode or overlord or something... all hail Starcraft!&lt;/strike&gt; SO far it does nothing...&lt;br /&gt;&lt;br /&gt;We need to fix this. We need to add something to it... we need the FlxG.keys.xxx&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;override public function update():void &lt;br /&gt;{&lt;br /&gt; if(FlxG.keys.LEFT)&lt;br /&gt; {&lt;br /&gt; x -= 3;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;FlxG.keys contains the keyboard stuffs you are looking for. To test for the left arrow key presses the "FlxG.keys.LEFT" is used&lt;br /&gt;So here we are telling if the LEFT key is pressed we need to minus the x coordinate of the ClosnShip by 3 pixel making it move to the left by 3 pixels.&lt;br /&gt;x -= 3; is the same as x = x - 3; &lt;strike&gt;It was implemented long ago during the Mayan time&lt;/strike&gt;&lt;br /&gt;Now which is what key as what who where? &lt;br /&gt;Simple... in Flash Develop, when you key in FlxG.keys. -&gt;upon hitting the "." after "keys", a whole list of keys will appear for you to choose so you don't need to remember what key as what who where.&lt;br /&gt;&lt;br /&gt;Now cater for RIGHT, DOWN and UP...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;override public function update():void {&lt;br /&gt; if(FlxG.keys.LEFT)&lt;br /&gt; {&lt;br /&gt;  x -= 3;&lt;br /&gt; }&lt;br /&gt; else if(FlxG.keys.RIGHT)&lt;br /&gt; {&lt;br /&gt;  x += 3;&lt;br /&gt; }&lt;br /&gt; else if(FlxG.keys.DOWN)&lt;br /&gt; {&lt;br /&gt;  y += 3;&lt;br /&gt; }&lt;br /&gt; else if(FlxG.keys.UP)&lt;br /&gt; {&lt;br /&gt;  y -= 3;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now run the game... tadaaa... you have keyboard control of the ship :D Yeah it goes beyond the viewable boundaries so we add...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;if(x &gt; FlxG.width-width-4)&lt;br /&gt; x = FlxG.width-width-4; //Checking and setting the right side boundary&lt;br /&gt;if(x &lt; 4)&lt;br /&gt; x = 4; &lt;br /&gt; &lt;br /&gt;if(y &gt; FlxG.height-height-4)&lt;br /&gt; y = FlxG.height-height-4; //Checking and setting the right side boundary&lt;br /&gt;if(y &lt; 4)&lt;br /&gt; y = 4; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This should stop it from going beyond the boundaries with a 4 &lt;strike&gt;mega&lt;/strike&gt;pixel margin :D&lt;br /&gt;&lt;br /&gt;The final ClownShip.as should look like this..&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package  &lt;br /&gt;{&lt;br /&gt;import org.flixel.*;&lt;br /&gt;&lt;br /&gt; public class ClownShip extends FlxSprite&lt;br /&gt; {&lt;br /&gt;  [Embed(source = "data/clownship.png")] private var ImgShip:Class;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  public function ClownShip(x:int)&lt;br /&gt;  {&lt;br /&gt;   super(x, y);&lt;br /&gt;   loadGraphic(ImgShip);&lt;br /&gt;  }&lt;br /&gt;  override public function update():void {&lt;br /&gt;&lt;br /&gt;   if(FlxG.keys.LEFT)&lt;br /&gt;   {&lt;br /&gt;    x -= 3;&lt;br /&gt;   }&lt;br /&gt;   else if(FlxG.keys.RIGHT)&lt;br /&gt;   {&lt;br /&gt;    x += 3;&lt;br /&gt;   }&lt;br /&gt;   else if(FlxG.keys.DOWN)&lt;br /&gt;   {&lt;br /&gt;    y += 3;&lt;br /&gt;   }&lt;br /&gt;   else if(FlxG.keys.UP)&lt;br /&gt;   {&lt;br /&gt;    y -= 3;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   if(x &gt; FlxG.width-width-4)&lt;br /&gt;    x = FlxG.width-width-4; //Checking and setting the right side boundary&lt;br /&gt;   if(x &lt; 4)&lt;br /&gt;    x = 4; &lt;br /&gt;   if(y &gt; FlxG.height-height-4)&lt;br /&gt;    y = FlxG.height-height-4; //Checking and setting the right side boundary&lt;br /&gt;   if(y &lt; 4)&lt;br /&gt;    y = 4; &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You should now have some idea about "super" and the all important "update" function which is called each game loop.&lt;br /&gt;Also important is the concept of parent and child function overriding :D&lt;br /&gt;&lt;br /&gt;The end product should look like this ...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_gbcDMCBsDoA/TG41Gm8UJCI/AAAAAAAAAGM/4I5D5xjLFJY/s1600/04.jpg"&gt;&lt;img style="WIDTH: 320px; HEIGHT: 241px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5507397781969708066" border="0" alt="" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/TG41Gm8UJCI/AAAAAAAAAGM/4I5D5xjLFJY/s400/04.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's about it this time :D This is turning out to be an introdution and understanding of classes and stuffs rather than game programming... hmm... well next time we are going to look into Flixel specific variables like Speed, Acceleration, Drag and how to handle multi key presses &lt;strike&gt;which you already know :D from the code above hehehe&lt;/strike&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-1258186351779327786?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/1258186351779327786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=1258186351779327786' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1258186351779327786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/1258186351779327786'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/08/keyboards-with-flixel-my-moving-ship.html' title='Keyboards with Flixel.. my moving ship.'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_gbcDMCBsDoA/S8e7_OGfWYI/AAAAAAAAAF0/A9ZnHHgOA1w/s72-c/03.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7909995457724205728</id><published>2010-08-20T13:55:00.003+08:00</published><updated>2010-08-20T14:02:54.618+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FlashPunk'/><category scheme='http://www.blogger.com/atom/ns#' term='Flixel'/><title type='text'>Updates on Flixel...</title><content type='html'>Hmm somehow Flixel has stopped with updates since version v2.43 which is like 65 days ago.. while on the other hand FlashPunk is showing constant updates up till v1.4 on August 11. &lt;br /&gt;&lt;br /&gt;Hope ChevyRay is doing well as we eagerly awaits more updates to Flixel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7909995457724205728?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7909995457724205728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7909995457724205728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7909995457724205728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7909995457724205728'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/08/updates-on-flixel.html' title='Updates on Flixel...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-3977515072987035022</id><published>2010-06-27T09:14:00.000+08:00</published><updated>2010-06-27T10:27:20.044+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Develop'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Flixel'/><title type='text'>Of bitmaps and sprites in Flixel</title><content type='html'>&lt;div&gt;Previously on winterglass, we learn how to setup and run an empty flixel project. If it works, congrats! If it doesn't it's time to call for help... :D cause I am moving forward to the next tutorial.&lt;br /&gt;What we are going to do here is to :&lt;br /&gt;&lt;br /&gt;- Import a bitmap into the game&lt;br /&gt;- Add the imported bitmap as a sprite to the game&lt;br /&gt;- &lt;strike&gt;Eat with your nose!&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Since we are not working in the Adobe Flash Pro interface we do not have the tools to draw &lt;strike&gt;lavishly beautiful&lt;/strike&gt; vector sprites. We are left with the option of importing &lt;strike&gt;Starcraft SUV sprites from the mpg files&lt;/strike&gt; from external file.&lt;br /&gt;Importing bitmap in Flixel does not restrict you to bitmap as in bmp files but you get the variety of png, jpg and bmp to choose from each with their own unique advantages. I will be dealing with png since it's clean &lt;strike&gt;unlike jpegs lossy compression&lt;/strike&gt; and has transparency :D&lt;br /&gt;Yes, transparency information in png. We will need to draw a 'ClownShip' with external drawing packages like GIMP, Photoshop, CorelDraw... &lt;strike&gt;MS Paint.&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Here is my ClownShip below!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_gbcDMCBsDoA/TCa2EO-If9I/AAAAAAAAAF8/YvVNYO9mIJc/s1600/clownship.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5487273379851960274" style="WIDTH: 64px; CURSOR: hand; HEIGHT: 32px" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/TCa2EO-If9I/AAAAAAAAAF8/YvVNYO9mIJc/s400/clownship.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I call it clownship.png. Cool right? I mean if you compare with the old vector ClownShip from my previous tutorials. This is a side view instead of the old top down view. You got it right, I am gonna make a left right scrolling shooter instead of the old top down. Enough about directions, since I am writing this tutorial I minus well do it nicely with a good game to end up with in the end.&lt;br /&gt;You might consider buying a Wacom tablet if you are into drawings. It makes drawing sprites ....... easier.&lt;br /&gt;&lt;br /&gt;The sprites we are importing is a 64 x 32 pixel sprite. The filename I choosed is clownship.png located at 'data' directory. Yes I created a directory called 'data' inside of 'src'&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5460539067562012194" style="WIDTH: 192px; CURSOR: hand; HEIGHT: 101px" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/S8e7WcwtLiI/AAAAAAAAAFs/fbpjldU7eBc/s400/02.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to create a class for the clownship. Why? because creating classes for stuffs makes it easier to control / manage once the project gets big. You will need classes for the player, the enemy...&lt;br /&gt;Under 'src', right click and Add-&gt;New Class. Call the new class 'ClownShip'. You will get a ClownShip.as file created for you in the 'src' directory.&lt;br /&gt;&lt;br /&gt;Your directory should now look like this.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5460539768001485186" style="WIDTH: 181px; CURSOR: hand; HEIGHT: 167px" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/S8e7_OGfWYI/AAAAAAAAAF0/A9ZnHHgOA1w/s400/03.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Now open up the file in the editor. Again you are not interested in the default items in the file. Replace them with these.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package &lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;import org.flixel.*;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; public class ClownShip extends FlxSprite&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;  [Embed(source = "data/clownship.png")] private var ImgShip:Class;&lt;br /&gt;&lt;br /&gt;  public function ClownShip()&lt;br /&gt;&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;   loadGraphic(ImgShip);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Lets go line by line again. In the previous episode, we started with classes that extends FlxGame then goes into FlxState. It simply means... We create a game base and put in a stage to the game. All game needs a stage even if it's just a title screen, a game level 1, 2, 3...&lt;br /&gt;Now we need to put in a player or sprite so we extends the FlxSprite thus the &lt;b&gt;public class ClownShip extends FlxSprite&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Embed(source = "data/clownship.png")] private var ImgShip:Class;&lt;/b&gt;&lt;br /&gt;- This is the way to tell it to import a bitmap picture called clownship.png in the 'data' subdirectory and refer to it as ImgShip.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;loadGraphic(ImgShip);&lt;/b&gt;&lt;br /&gt;- Ok loadGraphic is a function inherited from the FlxSprite class. Just go ahead and open the FlxSprite.as from the 'src/org/flixel/FlxSprite.as' directory and search for loadGraphic&lt;br /&gt;- Since it's in the constructor function of ClownShip, it simple loads the bitmap whenever it's created / instantiated.&lt;br /&gt;- The are other parameters which can be passed into the loadGraphic function. I will go that later but if you are interested you can just view the doc that comes with flixel.&lt;br /&gt;&lt;br /&gt;Ok now that you have created the ClownShip class, try hitting 'F5'... waaa laaaa.. nothing happens. Why? Because you didn't add it in the stage / state. Go back to LoadMeShip.as&lt;br /&gt;Declare the ClownShip and add it in the state! The code should look like this.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; import org.flixel.FlxState;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; public class LoadMeShip extends FlxState&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;  private var cShip:ClownShip;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;  public function LoadMeShip():void&lt;br /&gt;&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;   cShip = new ClownShip();&lt;br /&gt;&lt;br /&gt;   add(cShip);&lt;br /&gt;&lt;br /&gt;   //trace('I am running');&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;private var cShip:ClownShip;&lt;/b&gt;&lt;br /&gt;- You declare a ClownShip and call it cShip. You kinda need to grasp the concept here.&lt;br /&gt;- You are telling it that there is a thing called cShip which is a (type) ClownShip.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cShip = new ClownShip();&lt;/b&gt;&lt;br /&gt;- You are instantiating / creating the cShip as a new ClownShip. Basically you can create / instantiate lots of ClownShips with a different name but make sure you declare them first. This one so happends to be named cShip. &lt;strike&gt;Am I making sense? I am sounding weird here...&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;add(cShip);&lt;/b&gt;&lt;br /&gt;- Now you are adding the cShip, which is a type ClownShip to the playing stage! By default it's located top left ( x = 0, y = 0 )&lt;br /&gt;- What, where did 'add' come from? Take a guess.... yes it's from the FlxState class. To see what it does, just go to the doc under FlxState class and read on.. it tells you it needs an FlxObject to be passed in. FlxObject? Well now take a look at FlxSprite doc file. You see it says it inherits from FlxObject so making it a FlxObject... confuse?... you need to look into these docs often to get up and running on these libraries.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;//trace('I am running');&lt;/b&gt;&lt;br /&gt;- The // means I commented out this line of code. I think you all knew this already... I just needed this article to be a bit longer.&lt;br /&gt;&lt;br /&gt;Now hit 'F5' again. ta daaa.... you have the ship up at the top and it's ready to move around. Now hit the arrow keys. Yes.... yes..... it's not moving.&lt;br /&gt;You will have to wait for the next episode for that to happen! So stay tuned...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-3977515072987035022?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/3977515072987035022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=3977515072987035022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3977515072987035022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3977515072987035022'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/06/of-bitmaps-and-sprites-in-flixel.html' title='Of bitmaps and sprites in Flixel'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_gbcDMCBsDoA/TCa2EO-If9I/AAAAAAAAAF8/YvVNYO9mIJc/s72-c/clownship.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-6492404469923218979</id><published>2010-06-22T23:33:00.003+08:00</published><updated>2010-06-22T23:49:23.014+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>FIFA 2010...</title><content type='html'>It's here it's here... started... that means some shows are cancelled on TV just for the &lt;strike&gt;brokast&lt;/strike&gt; broadcast. Though you have to agress this time around, the outcome of the first few games are rather unexpected.&lt;br /&gt;&lt;br /&gt;I am not really a footbal fan &lt;strike&gt;sadly but true&lt;/strike&gt;. The only time I am into these things are for the Padini sticker books. Soon I realised that I can't get those books filled... always a missing sticker here and there...&lt;br /&gt;&lt;br /&gt;The same with the padini dinosaur collection and then that nice robot stickers... what was I thinking... I was &lt;strike&gt;a dino myself&lt;/strike&gt; young... what can i say.&lt;br /&gt;&lt;br /&gt;Ok back to the topic... football... soccer if you must. There seems to be some rather unsettling news on the new ball being used in FIFA 2010. Complains came in the form of&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Ball too round - resulting in weird angular kicks&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Ball too &lt;strike&gt;lite&lt;/strike&gt; light - causes much flying&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Ball too slippery - causes frequent miss&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Ball too aerodynamic - way better than Nissan 370Z&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Ball too &lt;strike&gt;happy&lt;/strike&gt; weird - player unable to determine the head or tail of the ball... I am talking nonsense again...&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The design and striking lines camoflauged it from the players eyes making them hard to judge its distant from them - the so near yet so far syndrome&lt;li&gt;&lt;br /&gt;&lt;li&gt;&lt;strike&gt;Ball too soft - stuck to foot when kicked too hard&lt;/strike&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;But well, seeing how things turned out, there might be some truth to those claims.&lt;br /&gt;Referees aren't exactly too shy in giving out colored cards either...&lt;br /&gt;&lt;br /&gt;Meanwhile I have missed Prince of Persia, A-Team, Toy Story 3 and a whole bunch of other movies... argg... I gotta keep up to date. Catch you all later...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-6492404469923218979?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/6492404469923218979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=6492404469923218979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/6492404469923218979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/6492404469923218979'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/06/fifa-2010.html' title='FIFA 2010...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-9181312510072617554</id><published>2010-05-31T17:52:00.001+08:00</published><updated>2010-05-31T18:05:40.405+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FlashPunk'/><category scheme='http://www.blogger.com/atom/ns#' term='Flixel'/><title type='text'>While I am away....</title><content type='html'>While I am away &lt;strike&gt;finishing off C&amp;C 4&lt;/strike&gt;, Flashpunk has gone Version 1. It was 0.8 before. Much improvement has been added includes the all mighty...&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;ability to choose frame or time based rate... framerate or timestep based game engine.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Various helper class for animation, collision and ... &lt;/li&gt;&lt;br /&gt;&lt;li&gt;basically a redesign of the classes for objects and inputs&lt;/li&gt;&lt;br /&gt;&lt;li&gt;powerful motion tweening stuffs&lt;/li&gt;&lt;br /&gt;&lt;li&gt;path based motion&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strike&gt;advanced godlike AI&lt;/strike&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;particle effects and emitters&lt;/li&gt;&lt;br /&gt;&lt;li&gt;we even have a more powerful sound department now... with pan, fading,... &lt;strike&gt;dolby and skywalker sound&lt;/strike&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Not to mentione the older pre - V1 source codes are uncompilable now with the V1 :(&lt;br /&gt;No worries... a quick porting over by your local flash programmer will do the trick. &lt;strike&gt;not&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;With these new stuffs in place and comparing the activities and updates on flixel and flashpunk, I can't help but to reevaluate which one should I concerntrate on...&lt;br /&gt;hmmm.... &lt;strike&gt;more news after the commercials&lt;/strike&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-9181312510072617554?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/9181312510072617554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=9181312510072617554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/9181312510072617554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/9181312510072617554'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/05/while-i-am-away.html' title='While I am away....'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7805352132250288706</id><published>2010-04-17T16:51:00.007+08:00</published><updated>2010-04-17T17:28:03.726+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Pathfinding... what is it?</title><content type='html'>Path finding is extremely important for some game. Note the 'some' games. Well this is because games like 'Tetris' does not need path finding, nor does Twin Bee. &lt;strike&gt;Wha? You don't know what Twin Bee is? Go google...&lt;/strike&gt; While some does not need it, others like C&amp;C (Command and Conquer) can't work without it. What does this 'pathfinding' means. Let's put it this way. When playing all rts (real time strategy), clicking on a tank and clicking on a destination, you actually asked the computer to move the tank to that destination. It needs to calculate the road it's gonna use, which bridge is accesible, what rock is blocking, which humans the tank can mow over... you get the point don't you? And thus... that is pathfinding.&lt;br /&gt;&lt;br /&gt;Basically an algorithm to calculate possible path from point A to B taking into account obstacles and some point even type of terrans &lt;strike&gt;terian... terry... &lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;This is just a small article to tell you what it is, I am done. Go on... go away...&lt;br /&gt;... it's over.&lt;br /&gt;&lt;br /&gt;Ok.. since you decided to read on, I am gonna introduce you to some path finding  algorithm. I am by no way gonna go detail into these algo but I am gonna direct you to some really nice readings about them.&lt;br /&gt;&lt;br /&gt;A* (pronounced "A Star") is one of the famous ones... and it's most famous article here at &lt;a href="http://www.policyalmanac.org/games/aStarTutorial.htm" target="_blank"&gt;http://www.policyalmanac.org/games/aStarTutorial.htm&lt;/a&gt; This article comes &lt;b&gt;highly&lt;/b&gt; recommended as I &lt;strike&gt;tried and tried to understand for about 80 years but to no avail&lt;/strike&gt; really gain some insight on it on the very first reading which got me interested to learn more. Oh ya... this is only good if you are dividing the play area into grids and want to find the nearest path from A to B. This one moves from one grid item to another and count and move to another and count and again and again. Yes it's quite computing intensive. You can see a sample here in flash... at &lt;a href="http://pixelwelders.com/experiments/pathfinding/" target="_blank"&gt;http://pixelwelders.com/experiments/pathfinding/&lt;/a&gt; if it's still there...&lt;br /&gt;&lt;br /&gt;Dijkstra's algorithm is another one. This is a bit different as it spreads out from it's origin until it reaches it's target unlike A* which travels node to node (point to point). I found and old example dated year 2000 at &lt;a href="http://www.electrotank.com/junk/mike/ai/precomputedPathTutorial.html" target="_blank"&gt;http://www.electrotank.com/junk/mike/ai/precomputedPathTutorial.html&lt;/a&gt;. Basically Dijkstra is slower than A* for the obvoius reason of spreading out...&lt;br /&gt;&lt;br /&gt;There are others out there but since we are going into Flixel with tilemap style gameplay I think the A* should suffice. Well no codes for today... just some reading... come on it's weekend... take some time out and play &lt;strike&gt;something duh...&lt;/strike&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7805352132250288706?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7805352132250288706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7805352132250288706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7805352132250288706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7805352132250288706'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/04/pathfinding-what-is-it.html' title='Pathfinding... what is it?'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-298464644278219737</id><published>2010-04-15T04:33:00.000+08:00</published><updated>2010-04-15T08:59:15.075+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Develop'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Flixel'/><title type='text'>Absolute Ultra Beginners guide to Flixel with Flash Develop</title><content type='html'>In the previous episode, we see the introduction of game libraries in flash scripting language namely Actionscript 3 or AS3. Ok I am going to make some huge assumptions here. What I am assuming are...&lt;br /&gt;&lt;br /&gt;- You are rather well to do with AS3&lt;br /&gt;- You have already looked through my previous tutorials&lt;br /&gt;- You know how to setup and already installed Flash Develop&lt;br /&gt;- You have already link to the Flex SDK (FREE download btw) and compiled the 'Hello World' example I previously wrote about.&lt;br /&gt;- &lt;strike&gt;You do not wear skirts&lt;/strike&gt;&lt;br /&gt;- &lt;strike&gt;You are geeky&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Ok.. here I am also assuming that&lt;br /&gt;&lt;br /&gt;- You want to program a game&lt;br /&gt;- You want to program a 2D game&lt;br /&gt;- You want to program a 2D game with sprites&lt;br /&gt;- You want to program a 2D game with sprites in AS3&lt;br /&gt;- &lt;strike&gt;You want to go head on with Blizzard WOW&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;If you are looking for 3D Flash, look elsewhere or maybe look here in like a few years later. I know we already have Papervision and other stuffs but I am still trying to grab 2D. &lt;br /&gt;&lt;br /&gt;First I will need you to download a game library... it will be &lt;a href="http://www.flixel.org" target="_blank"&gt;Flixel&lt;/a&gt;.. yeah... Wha? Why not Flashpunk? &lt;strike&gt;Do not argue with the master programmer&lt;/strike&gt; &lt;br /&gt;Well err... currently I have already started with Flixel. &lt;strike&gt;Yes I lied... I started with Flashpunk but it kinda links me to Flixel&lt;/strike&gt;&lt;br /&gt;Ok the reason being that flixel have less letters to type. There!&lt;br /&gt;&lt;br /&gt;Start an 'AS3 Project' under Flash Develop. Flash Develop will generate those default files. I call my project name Ship. What we are going to do is to :&lt;br /&gt;&lt;br /&gt;- Add a AS3 Project&lt;br /&gt;- Setup the Flixel Library &lt;br /&gt;- Initialises the FlxGame and FlxState&lt;br /&gt;- View the prebuilt in features&lt;br /&gt;&lt;br /&gt;After creating a new project, you will get a Main.as default file and if you press 'F5' to test the movie, it will be a blank screen.&lt;br /&gt;&lt;br /&gt;Now it will look like this in the Main.as. &lt;br /&gt;&lt;br /&gt;&lt;img style="cursor:pointer; cursor:hand;width: 132px; height: 118px;" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/S8Qs2uE57NI/AAAAAAAAAE0/ILOhhojYwHE/s400/01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459537966873046226" /&gt;&lt;br /&gt;&lt;br /&gt;Clear all those texts and import stuffs because we are going to use flixel and when we use flixel, flixel handles the import for us in the library itself &lt;strike&gt;whatever that means&lt;/strike&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package &lt;br /&gt;{&lt;br /&gt; import org.flixel.*;&lt;br /&gt;    [SWF(width = "500", height = "350", backgroundColor = "#000000")]&lt;br /&gt;&lt;br /&gt; public class Main extends FlxGame&lt;br /&gt; {&lt;br /&gt;  public function Main():void &lt;br /&gt;  {&lt;br /&gt;   super(500, 350, LoadMeShip, 1);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Just copy whatever is in above and replace whatever which was in the Main.as with it. There... hit 'F5'. You got a game running! Yeah!&lt;br /&gt;...&lt;br /&gt;..&lt;br /&gt;.&lt;br /&gt;&lt;br /&gt;Sadly no... it's not that easy.&lt;br /&gt;&lt;br /&gt;You did download the flixel library already right? Just unzip it and &lt;strike&gt;link to the library via the properties in the..... wait... there is a less confusing way... just &lt;/strike&gt; copy the 'org' folder in the 'src' folder in the project. &lt;br /&gt;It should look like this in the Project view. &lt;br /&gt;&lt;br /&gt;&lt;img style="cursor:pointer; cursor:hand;width: 146px; height: 169px;" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/S8Qs2ynLyDI/AAAAAAAAAE8/VIdHmESXYns/s400/02.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459537968090564658" /&gt;&lt;br /&gt;&lt;br /&gt;Ok now that you have copied the items into the correct place, hit 'F5' Wha? Again? You should get an error stating some undefined properties LoadMeShip. It's ok.&lt;br /&gt;&lt;br /&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 24px;" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/S8Qs3R3dNcI/AAAAAAAAAFE/5xg6P4PfHRU/s400/03.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459537976480314818" /&gt;&lt;br /&gt;&lt;br /&gt;Let's go line by line on the code we just put in. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;import org.flixel.*;&lt;/b&gt;&lt;br /&gt;- This simply means we are importing the flixel library located at org/flixel folder relative to the main.as and * simply means everything. So it translate to 'gimme everything from org/flixel'&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[SWF(width = "500", height = "350", backgroundColor = "#000000")]&lt;/b&gt;&lt;br /&gt;- Since we don't have a nice interface to tell how big we want the flash movie to be like in Flash Pro, we have to do it here like this. The parameters should explain themselves. Or should they?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;public class Main extends FlxGame&lt;/b&gt;&lt;br /&gt;- Why? extends? What? The class name 'Main' directly relates the the filename Main.as. When compile, the system will look for the filename as the class name so basically this is the entry point.&lt;br /&gt;- extends? If you have some kind of programming background this is equivalent to inherit. I hope I am right but basically this means the Main class inherits the FlxGame class (which by the way is located in org/flixel/FlxGame.as) and is capable of extending it's functionality. Gosh correct me if I am wrong...&lt;br /&gt;- If you look into FlxGame.as you will see it imports flash.display.Bitmap, Sprites and all so basically this FlxGame imports those stuffs and when you import extends FlxGame.as you kinda use those too.&lt;br /&gt;- Ok why do we need to extend from FlxGame? Well this is the kinda core class to extends from when using Flixel. To actually learn more about this, you can view in the documentation that comes with the downloaded library under docs/index.html. You will need to refer to these docs VERY frequently as I have to really understand the library you are using. It helps. It really does... and if you are wondering... wow.. these documents are cool.. how do they do that and keep up with all the updates. The answer is 'You can do it too :D' In Flash Develop, look under Tools-&gt;Flash Tools-&gt;Documentation Generator... wait I am going off topic... later then.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;public function Main():void &lt;/b&gt;&lt;br /&gt;- Hmm.. how do I explain this. This is actually the constructor function of the class. A function with the same name as the class will be it's constructor, the one that executes upon initialisation of the class &lt;strike&gt;, much like Protoss Executor from Starcraft I... I am talking rubbish again&lt;/strike&gt;&lt;br /&gt;- This is what will run first. As a further reading for you guys, read up on destructor.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;super(500, 350, LoadMeShip, 1);&lt;/b&gt;&lt;br /&gt;- No relation to Superman, try to guess what it does?&lt;br /&gt;- Although not immediately clear, the 'super' actually calls the class's superclass's constructor!&lt;br /&gt;- Yes...  Main being an extention of FlxGame, so Main's superclass is actually FlxGame class and FlxGame constructor is actually the FlxGame function in the FlxGame class which is in FlxGame.as file in org/flixel folder :p. Get it? I really hop you do because, there will be lots of super calling in the future and I really hope you know what it actually means. &lt;br /&gt;- Note the parameter passed in and relate it to the FlxGame constructor function : FlxGame(GameSizeX:uint,GameSizeY:uint,InitialState:Class,Zoom:uint=2)&lt;br /&gt;- 500 = GameSizeX:uint (Width of hte game screen)&lt;br /&gt;- 350 = GameSizeY:uint (Height of the game screen)&lt;br /&gt;- LoadMeShip = InitialState:Class (It will look for the LoadMeShip class, in this case, it's not found cause we have not add it yet!)&lt;br /&gt;- 1 = Zoom:uint=2 (Zoom level with a default of 2)&lt;br /&gt;&lt;br /&gt;So now that you realised the error came from the missing LoadMeShip class, all you need to do is to add that class in. Right click on the 'src' folder and Add-&gt;New Class&lt;br /&gt;&lt;br /&gt;&lt;img style="cursor:pointer; cursor:hand;width: 350px; height: 400px;" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/S8Qs30zEPgI/AAAAAAAAAFM/lXhm5JF_KeY/s400/04.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459537985857142274" /&gt;&lt;br /&gt;&lt;br /&gt;Call it 'LoadMeShip'. Again we don't want the default items in the class so just clear them out and replace with ...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package&lt;br /&gt;{&lt;br /&gt; import org.flixel.FlxState;&lt;br /&gt;&lt;br /&gt; public class LoadMeShip extends FlxState&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;  public function LoadMeShip():void&lt;br /&gt;  {&lt;br /&gt;   trace('I am running');&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;FlxState? What's that? Lets just put it as errr.... game states. You know like menu screen, level 1, level 2... so basically it's a game state we are dealing with here.&lt;br /&gt;You can read more about it in the docs. Now hit() 'F5' to run the test movie. If you get the &lt;br /&gt;&lt;br /&gt;&lt;center&gt;'Warning: This compilation unit did not have a xxx specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option.'&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;You should already know how to solve this (for Flex SDK 4) in my previous post. Just add &lt;br /&gt;&lt;br /&gt;&lt;center&gt;-static-link-runtime-shared-libraries=true&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;in the Project-&gt;Properties-&gt;Compiler Options-&gt;Additional Compiler Options&lt;br /&gt;Everything should run fine now. If you are fast enough you can catch the volume control sliding up out of view. This is a default for the volume control. You have lots of other prebuilt stuffs too. Try pressing '`'. You get a console telling your framerate and other infos. If you lose focus on the flash window, your game pauses and a pause screen shows :D&lt;br /&gt;So basically these are the stuffs which are handled by the Flixel game library.&lt;br /&gt;&lt;br /&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/S8Qs4ZLuM3I/AAAAAAAAAFU/3ZNM2HlM1Vo/s400/05.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459537995624231794" /&gt; &lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 239px;" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/S8QtCIeCxvI/AAAAAAAAAFc/ZxXyttYEnNk/s400/06.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459538162936366834" /&gt; &lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 239px;" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/S8QtCq2C0QI/AAAAAAAAAFk/lqr6f27umPY/s400/07.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5459538172163838210" /&gt;&lt;br /&gt;&lt;br /&gt;You should also be able to see the 'I am running' in the output panel in Flash Develop! If not you might be using a non debug flash player (solution also explain in my previous blog entry).&lt;br /&gt;&lt;br /&gt;Ok that's about as much I am able to write here for today. Sleeping already? Yes it's kinda boring at first but all these needs to be done for the progress to the next tutorial.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-298464644278219737?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/298464644278219737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=298464644278219737' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/298464644278219737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/298464644278219737'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/04/absolute-ultra-beginners-guide-to.html' title='Absolute Ultra Beginners guide to Flixel with Flash Develop'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/S8Qs2uE57NI/AAAAAAAAAE0/ILOhhojYwHE/s72-c/01.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-8826948107698997374</id><published>2010-04-13T09:11:00.006+08:00</published><updated>2010-04-13T09:50:57.352+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Develop'/><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>About game libraries and stuffs....</title><content type='html'>Well I noticed I mentioned Starcraft II back in 2008. It's 2010 now. My how time flies and I am still waiting for it's release... I wonder how those developers at Blizzard do it. I mean come on.. .2 years ? 1 game? Not ready yet? I seen the beta footage and all and it looks great... ready for release I think.&lt;br /&gt;&lt;br /&gt;Ok now look at myself... ha! 2 years barely 10 posts on this blog. &lt;strike&gt;Talk about kettle calling the pot black&lt;/strike&gt;. Anyway I do hope Starcraft II, when it's out 'soon' will be able to run on my aging PC. I got ready for the game 2 years ago, it's already outdated in terms of processing power and graphic card today. Still remember those... 'yes I needed that graphic card for the coming Starcraft II' in 2008 thoughts... but if they did started development 2 years ago, the PC requirements shouldn't be that bad right? &lt;strike&gt;yeah right... they probably had it on papers for a whole year&lt;/strike&gt; Right? Anyway C&amp;C 4 is out and it's been great! Supreme Commander II has since hang's on my PC and refuse to work. The only thing I could joyfully play on my PC now is actually..... &lt;br /&gt;...&lt;br /&gt;..&lt;br /&gt;.&lt;br /&gt;nothing.&lt;br /&gt;I am stuck with Flash Games and mini exe.&lt;br /&gt;Nothing works anymore.&lt;br /&gt;It started showing signs of aging when I poped in and installed Street Fighter 4 and started playing it in slow motion. Then that racing car game that doe not render correctly, then Supreme Commander II with it's 3 frame per second thingy on my PC when things get crowded. It's a sad world and if we don't upgrade often enough, we get left behind.&lt;br /&gt;&lt;br /&gt;Same goes to game programming. We need to constantly do stuffs... program mini modules... just get things compiling. It started out really hard when anyone try to grab the concept but with gradual trial and error, you get the picture.&lt;br /&gt;&lt;br /&gt;There are a few game libraries that work well with Flash Develop. Gone &lt;strike&gt;not really&lt;/strike&gt; were the days where I used to draw using that Flash Pro tools on vector graphics and all. Nowadays it's Gimp for graphics and a little bit of other tools.&lt;br /&gt;&lt;br /&gt;2 rather popular libraries are (FREE too)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flixel.org" target="_blank"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 24px; height: 40px;" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/S8PMwztd3JI/AAAAAAAAAEs/1sykEZ9BRW0/s400/flixel.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5459432312189869202" /&gt;&lt;br /&gt;- http://www.flixel.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flashpunk.net" target="_blank"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 100px; height: 100px;" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/S8PMwaqEUiI/AAAAAAAAAEk/dDcXIWMrm7I/s400/logo.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5459432305464726050" /&gt;&lt;br /&gt;- http://www.flashpunk.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;These 2 are suitable for sprite based games like those you get on 8-bit days. Wha? I am talking super mario here and games that are 2D, flat. As with other libraries, these 2 makes it easier for game programmers to put things on screen and move them around, provides easy collision detection methods, a game loop, blah blah..  &lt;strike&gt;the list goes on&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Of course there are others around like &lt;br /&gt;&lt;br /&gt;- http://pushbuttonengine.com&lt;br /&gt;- http://code.google.com/p/as3isolib&lt;br /&gt;- http://www.theoworlds.com&lt;br /&gt;&lt;br /&gt;and specialised libraris like&lt;br /&gt;&lt;br /&gt;- http://code.google.com/p/collisiondetectionkit&lt;br /&gt;&lt;br /&gt;These are all cool and all requires time to learn and get used to.&lt;br /&gt;Do take a look see, download the libraries and try them out!&lt;br /&gt;&lt;br /&gt;Now why should I? Well you should cause I am gonna use one of these libraries for my next tutorials! &lt;strike&gt;.. like next year or so... is that Ironman II coming out?&lt;/strike&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-8826948107698997374?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/8826948107698997374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=8826948107698997374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8826948107698997374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8826948107698997374'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/04/about-game-libraries-and-stuffs.html' title='About game libraries and stuffs....'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/S8PMwztd3JI/AAAAAAAAAEs/1sykEZ9BRW0/s72-c/flixel.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-121220233092038307</id><published>2010-04-08T14:18:00.006+08:00</published><updated>2010-04-08T17:16:19.352+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Develop'/><title type='text'></title><content type='html'>Ok now that you have got Flash Develop and Flex SDK on your end &lt;strike&gt;assuming you listen to my advice&lt;/strike&gt;, create a new AS3 project and hit F5. If everything is correct you will get the Flash Player running an empty screen. If you get an error stating...&lt;br /&gt;&lt;br /&gt;"Warning: This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option."&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;it's time to say good bye as your PC cannot and will not compile the script due to lack of vision&lt;/strike&gt; you are with the majority of us that got stuck with this. Mind you this error comes with SDK 4. After hunting around for a solution, fear not, I have found one!&lt;br /&gt;&lt;br /&gt;Go to Projects-&gt;Properties-&gt;Compiler Options-&gt;Additional Compiler Options&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://2.bp.blogspot.com/_gbcDMCBsDoA/S72AgB6W21I/AAAAAAAAAEM/Q3ELA409ekw/s1600/screen01.jpg"&gt;&lt;img style="WIDTH: 400px; HEIGHT: 327px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5457659611200281426" border="0" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/S72AgB6W21I/AAAAAAAAAEM/Q3ELA409ekw/s400/screen01.jpg" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Add -static-link-runtime-shared-libraries=true into the String Array... click on that '...' button to add. If you are like me, you will try to type into the 'String[] Array' thingy but it doesn't work. &lt;strike&gt;See the time I just saved you?&lt;/strike&gt; Once it's done.... hitting the F5 will release you from the pain which you are suffering. &lt;strike&gt;anger leads to hate, hate leads to pain, pain leads to suffering... is this right? Where does evil fit in?&lt;/strike&gt;&lt;br /&gt;It should look like below...&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://2.bp.blogspot.com/_gbcDMCBsDoA/S72AgbzVjcI/AAAAAAAAAEU/caKta8ZocDE/s1600/screen02.jpg"&gt;&lt;img style="WIDTH: 381px; HEIGHT: 224px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5457659618150157762" border="0" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/S72AgbzVjcI/AAAAAAAAAEU/caKta8ZocDE/s400/screen02.jpg" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Soon after there appears a blank Flash Player Screen. If it's not there, one of the reason might be that the 'No output' checkbox is checked. Just go to Projects-&gt;Properties to uncheck that OR you might have the 'Test Movie' option below messed up, which is not likely to happen.&lt;br /&gt;&lt;br /&gt;Everything runs, fine. You just compiled your first Flash Develop empty project. Now what fun is that? Lets put in the traditional 'Hello World' Expand the Project Viewer Tree &lt;strike&gt;(The thing on the right)&lt;/strike&gt; under 'src' you will see a Main.as file created for you. Right click on it, you will see the 'Always Compile' checked. What this simply means is that the main.as file will always compile &lt;strike&gt;Now that explanation is about as useful as a peice of s....&lt;/strike&gt;. Ok what it means is that the entry point to the flash .swf you are gonna generate starts from main.as so basically everything starts from main.as. If you are not keen on using main.as as the main starting point, fell free to add a new file and check it as 'Always Compile'. You will see that the main.as automatically demotes and the new file gets the 'Always Compile' icon! &lt;strike&gt;duuuhh&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;Ok.. back to coding. Starting from main.as, double click on it and watch what was defaulty &lt;strike&gt;is there such word?&lt;/strike&gt; written in it. That's basically the proposed item in it which is needed to compile an empty screen. &lt;strike&gt;Note 'proposed'...&lt;/strike&gt; Add a &lt;br /&gt;&lt;br /&gt;trace('Hello World');&lt;br /&gt;&lt;br /&gt;in the init function. Hit F5 and you should see a 'Hello World' in the 'Output' window.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://1.bp.blogspot.com/_gbcDMCBsDoA/S72Agg47-VI/AAAAAAAAAEc/fgjlhLj1NPE/s1600/screen03.jpg"&gt;&lt;img style="WIDTH: 279px; HEIGHT: 79px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5457659619515824466" border="0" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/S72Agg47-VI/AAAAAAAAAEc/fgjlhLj1NPE/s400/screen03.jpg" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;What's that? No Hello World? &lt;strike&gt;You need to spell it correctly in order to make it appear...&lt;/strike&gt; One of the reason is that you are testing it on a NON DEBUG flash player :D &lt;strike&gt;Yes, that was an issue for me for about 5 minutes.&lt;/strike&gt; To solve this just to go Adobe and get the 'Adobe Flash Player X — Debugger Versions' Get the standalone projector version if possible whichever that suits your style, just remember to point to it under&lt;br /&gt;&lt;br /&gt;Tools-&gt;Program Settings-&gt;FlashViewer ... mine is 'flashplayer_10_sa_debug.exe'.&lt;br /&gt;&lt;br /&gt;Ok you should be able to get the 'Hello World' working properly by now!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-121220233092038307?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/121220233092038307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=121220233092038307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/121220233092038307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/121220233092038307'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/04/ok-now-that-you-have-got-flash-develop.html' title=''/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/S72AgB6W21I/AAAAAAAAAEM/Q3ELA409ekw/s72-c/screen01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-8903988025978597857</id><published>2010-04-07T22:37:00.002+08:00</published><updated>2010-04-07T22:48:26.063+08:00</updated><title type='text'>Flex 4 SDK with Flash Develop</title><content type='html'>Ok my mistake... I took a look back at Adobe's site and discover the Flex 4 SDK is out. Download it from &lt;a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4"&gt;http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can read about the differences between 3 and 4 at &lt;a href="http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html"&gt;http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have you guys tried it with Flash Develop yet? Well I will be talking about this combination for my coming articles so get &lt;strike&gt;on right&lt;/strike&gt; right on to it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-8903988025978597857?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/8903988025978597857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=8903988025978597857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8903988025978597857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8903988025978597857'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/04/flex-4-sdk-with-flash-develop.html' title='Flex 4 SDK with Flash Develop'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-9096721651738198370</id><published>2010-03-28T22:02:00.007+08:00</published><updated>2010-03-28T22:52:24.207+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Develop'/><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>How time flies..</title><content type='html'>Gosh how time &lt;strike&gt;disappears&lt;/strike&gt; flies. It's 2010 and guess what? This site ain't getting much hits anymore. Well, I guess simply because of lack of updates. Don't worry... I will still be here &lt;strike&gt;not&lt;/strike&gt;. Kinda playing on with Flash Develop nowadays. In case you guys have no idea what it is look.... &lt;a href="http://www.blogger.com/www.flashdevelop.org" target="_blank"&gt;here&lt;/a&gt; at www.flashdevelop.org&lt;br /&gt;&lt;br /&gt;It's a free AS3 programming interface which works rather well for programmers. Note the words 'free AS3 programming interface'. This simple means you are not getting those drawing tools like you get in normal Adobe Flash Pro and stuffs like that. Well Flash Develop don't even have a timeline for you to look at. It's all in the mind... you need to plan it out and stare real hard at the screen to actually visualised something &lt;strike&gt;and they not to develop tumor&lt;/strike&gt;. What good is it anyway without those nice drawing and timeline? It's for the programmers... not designers. You get to compile stuffs written in pure actionscript. For a better understanding of what it is, here is a screenshot...&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/_gbcDMCBsDoA/S69nciBriDI/AAAAAAAAAD8/cpVogamWSAA/s400/flashdev01.jpg"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;You still get a compiled .swf as the final output just that you need more understanding in AS3 when doing it in Flash Develop than in Abode Flash Pro itself. For starters... remember how you use 'trace("Hello World!");' in the timeline to output in the debug window? No? &lt;strike&gt;What do you mean you don't remember?&lt;/strike&gt;&lt;br /&gt;... and how you conviniently use the 'this' to refer to the whatever you are writing the script to target in... well you need to specify if clearly and import, extends... full blown programming in Flash Develop. What I am trying to say is you pretty much needs to import the libraries and stuffs to use it &lt;strike&gt;unlike in Adobe Flash Pro where you are spoonfed with the basic libraries without lifting even a single finger.. well not really actually&lt;/strike&gt;. Flash Develop just don't work out of the download package itself. You need to get the FREE Downloadable Flex SDK from Adobe and point to it in Flash Develop under Tools-&gt;Program Settings. (At current time of writing it's Flex SDK 3.5) Screenshot as below...&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_gbcDMCBsDoA/S69qbrlATbI/AAAAAAAAAEE/7nT-P1ro5yA/s400/flashdev02.jpg"&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Once all that is up, you are ready to go... except you can't run in debug unless you download the Adobe Flash Debug Player or something like that from Adobe yet again FREE... &lt;br /&gt;&lt;br /&gt;So basically three stuffs to get going&lt;br /&gt;&lt;br /&gt;- Flash Develop - FREE&lt;br /&gt;- Flex SDK - FREE&lt;br /&gt;- Adobe Flash Debug Player - FREE&lt;br /&gt;&lt;strike&gt;- Brain - FREE&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;After that, just go ahead and google all the tutorials for Flash Develop. Yeah go on... go on.. what do you mean I am supposed to write one? And I am supposed to convince you to use it too? ... grrrrr&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-9096721651738198370?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/9096721651738198370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=9096721651738198370' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/9096721651738198370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/9096721651738198370'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2010/03/how-time-flies.html' title='How time flies..'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_gbcDMCBsDoA/S69nciBriDI/AAAAAAAAAD8/cpVogamWSAA/s72-c/flashdev01.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-8465029510780235485</id><published>2009-11-09T14:49:00.006+08:00</published><updated>2009-11-09T14:59:02.012+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Wow... missing in action.</title><content type='html'>Wow I noticed my last post was almost a year ago. Way to go for losing the readers and followers... if there are any to start with :)&lt;br /&gt;&lt;br /&gt;Anyway back to the Flash world, I have again discover something new... in the lines of... &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.3dfla.com" target="_new"&gt;http://www.3dfla.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's a plugin for 3D studio max to produce 3D flash stuff... after seeing how flash matures into a 3D playground over the pass few years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-8465029510780235485?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/8465029510780235485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=8465029510780235485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8465029510780235485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8465029510780235485'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2009/11/wow-missing-in-action.html' title='Wow... missing in action.'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-351947464549414864</id><published>2008-11-21T15:02:00.002+08:00</published><updated>2008-11-21T15:27:48.960+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><title type='text'>Have you heard of '3D Flash Animator'?</title><content type='html'>Have anyone heard of '3D Flash Animator'? It's suprising this piece of &lt;strike&gt;sweet&lt;/strike&gt; software is not mentioned often. Although I would say it's not exactly what the software name suggest... it's also actually a 'click and produce your game' software much like the old 'Klik &amp; Play' with actions and all those... even scripting if you are really into it!&lt;br /&gt;&lt;br /&gt;You can use it's various actions available for the objects (if you find programming AS3 to be really mind bogging unlike some 'multimedia fusion' tool... ).. not too many though... but you have the basics for a good game like collisions and such... &lt;br /&gt;&lt;br /&gt;The end result may be output in the web just like normal flash would...&lt;br /&gt;&lt;br /&gt;Anyway if you are interested, you can visit the site at &lt;a href="http://www.3dfa.com" target="_blank"&gt;http://www.3dfa.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-351947464549414864?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/351947464549414864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=351947464549414864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/351947464549414864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/351947464549414864'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/have-you-heard-of-3d-flash-animator.html' title='Have you heard of &apos;3D Flash Animator&apos;?'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-4346845375446899992</id><published>2008-11-17T17:11:00.003+08:00</published><updated>2008-11-17T17:19:43.864+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Tutorial Sourcecode Downloadables available!</title><content type='html'>Yup, you heard that right! I have added the sourcecodes for Tutorial 8 and 9 in ZIP format ready for downloading! Now if you have followed some of m tutorial you mgiht find it difficult for ME to refer to certain items... NOT anymore! Now download those files and I will just refer to them as item A, line 5 .. go check it out and read! Ha! Having said that... the solution is fairly straight forward. This blog is in blogspot and I hosted the files via sites.google.com so it's basically the same family! I hope this keeps on working and does not violate any rules. Anyway do inform me if this method is &lt;strike&gt;illegal&lt;/strike&gt; not right.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;PS : I have finisheddddddd RED ALERT 3.. hahahaha!!! Now looking forward for Starcraft 2... just when is that coming... I thought it was this year???&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-4346845375446899992?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/4346845375446899992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=4346845375446899992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/4346845375446899992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/4346845375446899992'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/tutorial-sourcecode-downloadables.html' title='Tutorial Sourcecode Downloadables available!'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-4968202417445314440</id><published>2008-11-11T17:54:00.009+08:00</published><updated>2008-11-17T17:06:56.396+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 09 - Collision Detection'/><title type='text'>AS3 09 - Collision Detection</title><content type='html'>You have put something on screen, move it around with your keyboard and shooting stuffs out of it. Logically, we should now put in something to shoot at &lt;strike&gt;before we get bored&lt;/strike&gt;. But before we go into that &lt;strike&gt;lets listen to me talk some nonsense&lt;/strike&gt;, lets talk about collision detection a little. Hands up for those who knows what ‘collision detection’ means… ahh.. I see all of you know this… so therefore I &lt;strike&gt;shall&lt;/strike&gt; &lt;strike&gt;will&lt;/strike&gt; &lt;strike&gt;shall&lt;/strike&gt; will not linger around any longer… anyway it’s basically how you measure if something collides with another… like err… bullet overlaps or intersects with enemy &lt;strike&gt;shit&lt;/strike&gt; ship. Say.. that sounds familiar… that sounds like the hitTestObject() method definition in AS3. Yeah.. I took the ‘overlaps or intersects’ right out of that one. So all you need to do is to run object A hitTestObject with object B and this little &lt;strike&gt;joker&lt;/strike&gt; method returns ‘true’ or ‘false’.&lt;br /&gt;&lt;br /&gt;Now down to codes and stuffs that might bore you. First create the enemy, for simple sake my enemy look like a red trangle with a black outline. I convert it into a movie symbol and called it ‘myEnemy’. Create a new AS3 Class file for myEnemy and all those class &lt;strike&gt;shit&lt;/strike&gt; stuffs.&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5267336701505912050" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 134px; CURSOR: hand; HEIGHT: 97px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SRlW0o2jPPI/AAAAAAAAADk/bSqegVUfqnk/s400/myEnemy.jpg" border="0" /&gt;&lt;br /&gt;The class file looks like this..&lt;br /&gt;&lt;br /&gt;Filename : myEnemy.as&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt;&lt;br /&gt; public class myEnemy extends Sprite{&lt;br /&gt;&lt;br /&gt;  private var timeVal:int;&lt;br /&gt;&lt;br /&gt;  public function myEnemy(x,y){&lt;br /&gt;   this.x = x;&lt;br /&gt;   this.y = y;&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Just a simple class to place the enemy on the x and y location specified when initializing.&lt;br /&gt;Now we need to add it in the main AS309.as file. (Yeah you need to create and change all the name to follow the tutorial from AS308.as… also remember the class and the constructor’s name needs to be change accordingly... &lt;strike&gt;I am not gonna tell you how because I told you in the previous tutorial… muahahaha....&lt;/strike&gt;)&lt;br /&gt;&lt;br /&gt;At the declaration section, add in …&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;var oneEnemy:myEnemy;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;…and in the main function AS309 after the addChild(ClownShip);, add in…&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;oneEnemy = new myEnemy(stage.stageWidth/2,40);&lt;br /&gt;addChild(oneEnemy);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now you got a completely easy target placed directly in front of the ship. Start shooting at it. Now lets add in collision detection. We are going to add a text object on screen to tell you how much hit you got.&lt;br /&gt;&lt;br /&gt;For this, let me introduce to you the “import flash.text.TextField;”. You will need to import this whenever you deal with textbox and such. To cut some explanation short, add these codes in the main AS309.as file…&lt;br /&gt;&lt;br /&gt;In the declaration section…&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;var myHitsTxt:TextField;&lt;br /&gt;var myHitsNo:int;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In the main AS309 function…&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;myHitsTxt = new TextField();&lt;br /&gt;myHitsTxt.x = 10;&lt;br /&gt;myHitsTxt.y = 10;&lt;br /&gt;addChild(myHitsTxt);&lt;br /&gt;myHitsTxt.text = String(myHitsNo);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;… put that piece of code just before the closing bracket. Why? Because we want it to Trender last, after the clownShip and enemy. Now for the actual event that calls the hitTestObject… we add in an event which runs every frame that calls the checkCols function which test the objects for collision…&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;stage.addEventListener(Event.ENTER_FRAME, checkCols);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the function…&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;public function checkCols(event:Event) {&lt;br /&gt; var bulletNo:int = mybullets.length-1;&lt;br /&gt; for(bulletNo;bulletNo&gt;=0;bulletNo--){&lt;br /&gt;   if (mybullets[bulletNo].hitTestObject(oneEnemy)) {&lt;br /&gt;    mybullets[bulletNo].deleteBullet();&lt;br /&gt;    myHitsNo ++;&lt;br /&gt;    myHitsTxt.text = String(myHitsNo);&lt;br /&gt;    break;&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What happens here is the code loops through every bullet (which was placed in the array) and check each one for collision with the ‘oneEnemy’. If it did collide, then we add to the hits counter, myHitsTxt. Simple right?&lt;br /&gt;&lt;br /&gt;Now try running a test movie. Yes! Your first collision detection! Hhaha… the bullet even destroy itself upon impact. Wait.. you are not drooling yet… it’s actually a simple concept right? And if the bullet destroy itself wouldn’t that mess up the array? Well if you look at the previous tutorial, in the .deleteBullet() function, it actually splice out the destroyed bullet so when it loops through again, the array length will be less… and how come you count down – instead of count up ++ in the loop? Experience is the bext teacher so try doing it the other way around… hmm…&lt;br /&gt;&lt;br /&gt;If you count up ++, let’s say you move from B1 to B2 to B3 to B4. Let’s say you hit on B2, that also means you splice the array and now it’s B1,B3,B4 but then you are moving forward from the front to the back… to the third position which is occupied by B4 instead of check with B3. You will be skipping one bullet… BUT if you do a countdown you splice out at the end and move forward to the front. You won’t miss a thing… get it? It’s ok… I get confuse of what I am trying to say sometimes…&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Here is the final product!&lt;/b&gt; Download &lt;b&gt;SOURCECODE&lt;/b&gt; &lt;a href="http://sites.google.com/site/winterglasssite/Home/AS3-09.zip"&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/zip.gif"/&gt;&lt;/a&gt;&lt;br /&gt; &lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="550" height="400" id="AS3-09" align="middle"&gt;&lt;br /&gt; &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt; &lt;param name="allowFullScreen" value="false" /&gt;&lt;br /&gt; &lt;param name="movie" value="http://sites.google.com/site/winterglasssite/Home/AS3-09.swf" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="bgcolor" value="#ffffff" /&gt; &lt;embed src="AS3-09.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="AS3-09" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" &gt;&lt;/embed&gt;&lt;br /&gt; &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I guess that should be it this time. Next I will add in &lt;strike&gt;more Red Alert 3 related&lt;/strike&gt; a simple AI to the enemy…. movement and make it shoots back.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-4968202417445314440?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/4968202417445314440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=4968202417445314440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/4968202417445314440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/4968202417445314440'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/as3-09-collision-detection.html' title='AS3 09 - Collision Detection'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_gbcDMCBsDoA/SRlW0o2jPPI/AAAAAAAAADk/bSqegVUfqnk/s72-c/myEnemy.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-434200341194750434</id><published>2008-11-06T08:22:00.005+08:00</published><updated>2008-11-17T17:10:49.891+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 08 - Shooting Bullets'/><title type='text'>AS3 08 - Shooting Bullets</title><content type='html'>Continuing from the previous tutorials… Now that we got the clownShip moving about, we are going to make it shoot bullets. (Remember if you rename the main AS07.fla to AS08.fla and AS07.as to AS08.as, you need to re-link the class to the main document under the document properties to AS08.as… also… since the AS07.as is now AS08.as, you need to alter the public class name from ‘public class AS307 extends MovieClip’ to ‘public class AS308 extends MovieClip’.. and also… the constructor from ‘public function AS307()’ to ‘public function AS308()’. Please keep all these in mind)&lt;br /&gt;&lt;br /&gt;Let’s create the bullet now. This is how my bullet look like… with 800 times magnification.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5265333496162517218" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 75px; CURSOR: hand; HEIGHT: 68px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/SRI46va7gOI/AAAAAAAAADU/OLasvMT_uz4/s400/bullet_08.jpg" border="0" /&gt;&lt;br /&gt;Yup… a simple circle. Convert it into a symbol and named it ‘myBullet’. Create a class for the bullet… myBullet.as. I hope these all makes sense &lt;strike&gt;or suffer the consequences for not reading my last tutorial…&lt;/strike&gt; because I have already explain how to do all these in the previous tutorial. Now what we need to do is whenever the bullet is created :&lt;br /&gt;&lt;br /&gt;It will start from the clownShip&lt;br /&gt;It will move upward from the clownShip&lt;br /&gt;Delete the bullet when going out of screen&lt;br /&gt;&lt;br /&gt;So if you already have guessed it correctly, it needs the coordinates of the clownShip and then speed / direction it will move. Moving it upwards should be a loop event so we use the ENTER_FRAME event listener to trigger a function to move it upwards after the bullet has been created. When the bullet reaches beyond the top of the screen, we need to delete it. (The coordinate of a flash document starts from the top left corner and increases as it moves horizontal, x and vertical, y. So basically the top would be when y=0, the bottom would be when y = height of the document.). Then whenever we delete the bullet, we need to end it’s listener too. Don’t forget or you will let it loop to eternity &lt;strike&gt;and beyond!&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;A question arises on how do we manage so many bullets at one time? I mean how do we keep track of each bullet whenever it has been created / shoot? And the answer isssss….. array. Now what’s an array? Googling it would be a good idea as I can’t really explain that well &lt;strike&gt;due to my lack of wisdom.&lt;/strike&gt; Create and array as a placeholder and push in a reference to each bullets to build up the array. Why do we need this? Well… it’s actually part of the next tutorial to loop through the bullet array to check for collision with the enemy object... I thought I would explain it here for easier understanding later on… but… well.. just remember that we put in an array to hold the reference to each bullet for the time being. Anyway the array should be in the main AS08.as class since it will be shared with other objects later on. The myBullet.as file should look like this.&lt;br /&gt;&lt;br /&gt;Filename : myBullet.as&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt; import flash.events.*;&lt;br /&gt; import flash.utils.getTimer;&lt;br /&gt;&lt;br /&gt; public class myBullet extends Sprite{&lt;br /&gt;&lt;br /&gt;  private var timeVal:int;&lt;br /&gt;  private var myspeed:Number;&lt;br /&gt;&lt;br /&gt;  public function myBullet(x,y,speed){&lt;br /&gt;   this.x = x;&lt;br /&gt;   this.y = y;&lt;br /&gt;   timeVal = getTimer();&lt;br /&gt;   myspeed = speed;&lt;br /&gt;   addEventListener(Event.ENTER_FRAME,moveBullet);&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;  public function moveBullet(event:Event) {&lt;br /&gt;   var timeDiff:int = getTimer()-timeVal;&lt;br /&gt;   timeVal += timeDiff;&lt;br /&gt;&lt;br /&gt;   this.y += myspeed*timeDiff/1000;&lt;br /&gt;   &lt;br /&gt;   if (this.y &lt; 0) {&lt;br /&gt;    deleteBullet();&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public function deleteBullet() {&lt;br /&gt;   MovieClip(parent).removeBullet(this);&lt;br /&gt;   parent.removeChild(this);&lt;br /&gt;   removeEventListener(Event.ENTER_FRAME,moveBullet);&lt;br /&gt;  }&lt;br /&gt;   &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I guess it’s pretty much self explanatory as most of the codes are seen on the previous tutorial except this little &lt;strike&gt;bugger&lt;/strike&gt; one… parent.removeChild(this); It’s actually calling a function on the main parent class which is the AS08.as called removeChild… the part&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;   if (this.y &lt; 0) {&lt;br /&gt;    deleteBullet();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;tells the flash player to call the deleteBullet function which takes it out of the array “MovieClip(parent).removeBullet(this)” and remove the bullet from screen “parent.removeChild(this)” and actually remove the listeners which are are not going to use anymore for that bullet “removeEventListener(Event.ENTER_FRAME,moveBullet)” since it’s deleted.&lt;br /&gt;&lt;br /&gt;Anyway, the AS08.as look like this…&lt;br /&gt;&lt;br /&gt;Filename : AS08.as&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt; import flash.events.*;&lt;br /&gt;&lt;br /&gt; public class AS308 extends MovieClip{&lt;br /&gt;&lt;br /&gt; var leftdown,rightdown:Boolean = false;&lt;br /&gt; var clownShip:myShip;&lt;br /&gt; var mybullets:Array;&lt;br /&gt;&lt;br /&gt; public function AS308(){&lt;br /&gt;&lt;br /&gt;  stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKeyDown);&lt;br /&gt;  stage.addEventListener(KeyboardEvent.KEY_UP, listenKeyUp);&lt;br /&gt;&lt;br /&gt;  clownShip = new myShip(stage.stageWidth/2,stage.stageHeight - 40);&lt;br /&gt;  addChild(clownShip);&lt;br /&gt;  mybullets = new Array();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public function listenKeyDown(event:KeyboardEvent)&lt;br /&gt; {&lt;br /&gt;  if (event.keyCode == 37) { //Left arrow&lt;br /&gt;   leftdown = true;&lt;br /&gt;  }&lt;br /&gt;  if (event.keyCode == 39) { //Right arrow&lt;br /&gt;   rightdown = true;&lt;br /&gt;  }&lt;br /&gt;  if (event.keyCode == 32) { //Spacebar&lt;br /&gt;   shootBullet();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt; public function listenKeyUp(event:KeyboardEvent)&lt;br /&gt; {&lt;br /&gt;  if (event.keyCode == 37) { //Left arrow&lt;br /&gt;   leftdown = false;&lt;br /&gt;  }&lt;br /&gt;  if (event.keyCode == 39) { //Right arrow&lt;br /&gt;   rightdown = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public function shootBullet() {&lt;br /&gt;  var b:myBullet = new myBullet(clownShip.x,clownShip.y-20,-250);&lt;br /&gt;  addChild(b);&lt;br /&gt;  mybullets.push(b);&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt; public function removeBullet(mybullet:myBullet) {&lt;br /&gt;  for(var i in mybullets) {&lt;br /&gt;   if (mybullets[i] == mybullet) {&lt;br /&gt;    mybullets.splice(i,1);&lt;br /&gt;    break;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I have declared&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt; var clownShip:myShip;&lt;br /&gt; var mybullets:Array;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;at the base class because I am using them for the coordinates of the bullet and adding bullets into the array. Note the new&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;  if (event.keyCode == 32) { //Spacebar&lt;br /&gt;   shootBullet();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;.. is for the spacebar key… and also the new functions… shootBullet and removeBullet. shootBullet pass in the x and y-20 (why y-20? Because we want it to shoot from the tip of the front, not the middle of the ship…) coordinates of the clownShip along with the speed and direction of the bullet. Negative being moving up. 250 being moving 250 pixels per second. The removeBullet actuualy removes the bullet from the array via the splice function and breaks the loop once the item is found and removed &lt;strike&gt;seeing no point to go further after Neo is actually killed in the Matrix right?&lt;/strike&gt;.&lt;br /&gt;&lt;br /&gt;Test run the movie and see what happens. Hitting the spacebar should release the bullets from the ship. Looks nice?&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5265333497375588210" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 325px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SRI46z8Jf3I/AAAAAAAAADc/2XChuaBQPrc/s400/as08.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Download &lt;b&gt;SOURCECODE&lt;/b&gt; &lt;a href="http://sites.google.com/site/winterglasssite/Home/AS3-08.zip"&gt;&lt;img src="http://sites.google.com/site/winterglasssite/Home/zip.gif" border="0"/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, still think game programming is &lt;strike&gt;easy&lt;/strike&gt; nice to dive in? Read on… err… next we will look into adding an enemy and check for collision detection with the bullets… that’s when you see why I put the array for… hohohoh… until then, kudos to The Empire of the Rising Sun for such wonderfully feeble looking tsunami tank…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-434200341194750434?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/434200341194750434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=434200341194750434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/434200341194750434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/434200341194750434'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/as3-08-shooting-bullets.html' title='AS3 08 - Shooting Bullets'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/SRI46va7gOI/AAAAAAAAADU/OLasvMT_uz4/s72-c/bullet_08.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-6401604333644085334</id><published>2008-11-04T17:41:00.002+08:00</published><updated>2008-11-04T17:46:24.059+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Open wider...</title><content type='html'>At last it's wider... I was looking at my blog and noticed how 'thin' it is. As I post my codes, they kinda get the nextline treatment and I didn't really like that. Thennn... Ta daaa... now it's 900 px across the screen... originally 700. In case anyone would like to know how to do this, it lies with the Layout-&gt;Edit HTML page again. Different template offers different ways of changing but basically just search for width and a little bit of experiment, you should get it right. &lt;br /&gt;&lt;br /&gt;Anway please backup or copy the codes to another page first before attempting this as it might ended up being &lt;strike&gt;totally crap&lt;/strike&gt; corrupted.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-6401604333644085334?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/6401604333644085334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=6401604333644085334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/6401604333644085334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/6401604333644085334'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/open-wider.html' title='Open wider...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-3937946571081912436</id><published>2008-11-04T16:57:00.005+08:00</published><updated>2008-11-04T17:26:08.130+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 07 – Classes'/><title type='text'>AS3 07 – Classes, your best friend</title><content type='html'>I graduated from UPM, a local University in Malaysia and one thing that really frightens me is I actually graduated without much knowledge about classes in programming. We didn’t really have extensive classes about classes &lt;strike&gt;(or maybe I didn’t pay much attention)&lt;/strike&gt; and the few classes I remembered didn’t really put much effort in classes. Hah! Maybe it’s a class of it’s own. &lt;strike&gt;Ok enough rubbish.&lt;/strike&gt; They did teach about classes, just that I didn’t really think it was THAT important.&lt;br /&gt;&lt;br /&gt;I &lt;strike&gt;tried to&lt;/strike&gt; picked up Flash AS3 &lt;strike&gt;since last month after I bought a dummies book&lt;/strike&gt; after the 3D demo on balls flying around got me interested and like most others.. downloaded some codes and view at them in awe and decided never to look at programming ever again. Well, we can’t cheat to learn. To learn something is to understand how it is and to understand how it is, is to spend some time with it. If you are not following this with hands-on practical, most likely you will be missing out something…&lt;br /&gt;&lt;br /&gt;We are now at tutorial 7. We started with placing movieclips, symbols and instances in Flash, getting the input from keyboard, moving objects around based on frame and time. All these were done within the frame in the timeline. &lt;strike&gt;We didn’t even bother renaming ‘Layer 1’ hahahaha… &lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264725002458951730" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 224px; CURSOR: hand; HEIGHT: 63px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/SRAPfvuu8DI/AAAAAAAAACs/L59PNPLkCjI/s400/timeline.jpg" border="0" /&gt;&lt;br /&gt;Not that it is a bad thing to start with but as you progress &lt;strike&gt;along the lines of insanity, you might want to confuse the readers into giving up their leisure time to do this…&lt;/strike&gt;, you will notice the codes starts to get a little cluttered and if this continue, it will get &lt;strike&gt;ugly&lt;/strike&gt; pretty unmanageable. For someone who actually read this far, I guess you must have realized that &lt;strike&gt;I am buying time to figure out what to write&lt;/strike&gt; the next step is to invite in your best friend, &lt;strike&gt;Rudy from Hitz…&lt;/strike&gt; ‘classes’. What are classes in terms of programming? You can get the answer by googling it. What I introduce here is how it can benefit you in Flash AS3. Let’s just redo the entire thing from the beginning but this time with classes involved.&lt;br /&gt;&lt;br /&gt;Create a new Flash File (ActionScript 3.0). Copy over the myShip symbol (the movieclip type you see in your library section. &lt;strike&gt;extensively referred to as clownShip in previous tutorials&lt;/strike&gt;) Leave the timeline alone as we are not going to touch that. Now create a new ActionScript file (as shown below).&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264724998628772018" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 262px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SRAPfhdjCLI/AAAAAAAAAC0/4JK1hOZNrPY/s400/asfile.jpg" border="0" /&gt;&lt;br /&gt;Name it AS307.as. It a big white empty space for you to write scripts in. Now go back in the main Flash File, in the document properties section create a link to the ‘AS307.as’ by typing in the Class as ‘AS307’ which is the filename of the ActionScript file we just created. It should look like this…Class : AS307 with the myShip in the Library.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264725000869846466" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 204px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SRAPfpz3HcI/AAAAAAAAAC8/fLbTVQfQBe8/s400/docpro.jpg" border="0" /&gt;&lt;br /&gt;Run the test movie. It’s a blank file so nothing is there. Go back to the ActionScript AS307.as file. It’s blank. Yeah.. I repeated twice.. Let’s write out our first class.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt; public class AS307 extends MovieClip{&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you run the test movie, it’s still a blank screen. What we did here was a bare minimum for a class declaration. Each class starts with package{} for the class. Within the package we need to import predefined items which we are going to use…. Example if we are to use the textbox functions within the class, we need to write in&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;import flash.text.*;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For the time being, importing the flash.display.* should be sufficient. Within the package we declare the class name. The class name we declare here must be similar to the filename of the .as file. We named our file AS307.as so the class name is AS307 not very interesting isn’t it? Now we need a constructor… what’s a constructor? It’s a function that runs whenever the class initializes, that means whenever it starts. The constructor must have the same name as the class &lt;strike&gt;while the destructor has a ~ in front… wait… wrong language…&lt;/strike&gt; so the code should look like this.&lt;br /&gt;&lt;br /&gt;Filename : AS307.as&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*; //Importing all display related…&lt;br /&gt;&lt;br /&gt; public class AS307 extends MovieClip{&lt;br /&gt;&lt;br /&gt;  public function AS307(){ //Constructor&lt;br /&gt;    trace('Hello world again');&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I put in a trace statement so when you run the test movie, you should see ‘Hello world again’ in the output window. Let’s extend this and put in the clownShip at the same time takes out the trace statement.&lt;br /&gt;&lt;br /&gt;Filename : AS307.as&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt;&lt;br /&gt; public class AS307 extends MovieClip{&lt;br /&gt;&lt;br /&gt;  public function AS307(){&lt;br /&gt;var clownShip:myShip = new myShip;&lt;br /&gt;addChild(clownShip);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Run the test. Your clownShip should appear at coordinates (0,0) like below.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264725003387903266" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 326px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/SRAPfzMNnSI/AAAAAAAAADE/VYmbsA2CR60/s400/as3-07a.jpg" border="0" /&gt;&lt;br /&gt;Well what happened was we created a variable (var) named clownShip of type myShip with …&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;var clownShip:myShip = new myShip&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;…then we add it into the scene / stage with the addChild().&lt;br /&gt;&lt;br /&gt;Now we are NOT going to tell the clownship to move to the near bottom middle like what we used to at AS307.as. Why? Because it’s not the OOP (Object Oriented Programming) way. &lt;strike&gt;Wow am I actually saying this?&lt;/strike&gt; We are going to create another class for the myShip and then define whatever we need about the ship there. This should include an input of the start coordinates.&lt;br /&gt;&lt;br /&gt;Create another ActionScript file and named it myShip.as (save it as myShip.as). This will automatically be referenced to by the myShip object in the library. How? Go back to the main flash document AS3-07.fla. Notice the myShip we copied from the previous projects in the library section? Right click it and choose to view its properties. Under ‘Linkage’ look at ‘Class’, it shows ‘myShip’. This is also the class filename for that particular symbol.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264725003284663586" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 300px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SRAPfyzmTSI/AAAAAAAAADM/sAMRUtCeDu4/s400/as3-07b.jpg" border="0" /&gt;&lt;br /&gt;Now in the myShip.as file, code in the class and all those &lt;strike&gt;silly&lt;/strike&gt; stuffs. It should look like this&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package{&lt;br /&gt; import flash.display.*;&lt;br /&gt; public class myShip extends MovieClip{&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Again we need to import the flash.display.* because we are extending the functionality of myShip from the MovieClip class which is actually part of the flash.display.* class. Am I saying it right? Please correct me if I am wrong &lt;strike&gt;as I am constantly thinking of Red Alert 3&lt;/strike&gt; Why MovieClip? There are actually 2 obvious options for this. First we created the myShip as a movieClip symbol so basically we are extending from there. Second one might ask why not extending it from ‘Sprite’? Why? &lt;strike&gt;I don’t want to that’s why… stop asking…&lt;/strike&gt; Actually it’s because I intend to add animation frames in the timeline to the myShip in the future. ‘Sprite’ is simply movieclip minus the timeline. So for the time being, let’s just use movieclip. We add a constructor function which receives an x and y coordinates and a few lines to make the ship appear at the bottom middle. ‘this’ in this context refers to the myShip.&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package{&lt;br /&gt; import flash.display.*;&lt;br /&gt; public class myShip extends MovieClip{&lt;br /&gt;  public function myShip(x,y){&lt;br /&gt;   this.x = x;&lt;br /&gt;   this.y = y;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note I have 2 parameters that needed to be passed into the constructor function. This means whenever I create / initializes the myShip, I need to pass in 2 items, the x and y coordinates. So lets go back to AS307.as and alter the script a little. Put in&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;var clownShip:myShip = new myShip(stage.stageWidth/2,stage.stageHeight - 40);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;replacing the&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;var clownShip:myShip = new myShip;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The codes should look like this...&lt;br /&gt;&lt;br /&gt;Filename : AS307.as&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt;&lt;br /&gt; public class AS307 extends MovieClip{&lt;br /&gt;&lt;br /&gt;  public function AS307(){&lt;br /&gt;     var clownShip:myShip = new myShip(stage.stageWidth/2,stage.stageHeight - 40);&lt;br /&gt;     addChild(clownShip);&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We are actually passing the start x and y coordinates for the myShip. Now run the test movie. The clownShip should appear at middle bottom. My my… this is turning out to be a long winded tutorial.&lt;br /&gt;&lt;br /&gt;Next we will need to create an event listener for keyboard and how it communicates with the clownShip. The event listener should be placed at the AS307.as file while the actually code to move the ship should be placed in the myShip.as file. Why? &lt;strike&gt;It’s the OOP way so stop asking…&lt;/strike&gt; We should err… encompass… err… cover all myShip related functions within the myShip class itself. Whatever that sound like… yeah that’s it. So in the AS307.as, let us put in…&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;var leftdown,rightdown:Boolean = false;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;…in the main public class. Wait.. I think I skipped a part. What is with the public.. public stuffs? Simple… there are only 2 popular ones… public and private. It’s like err… taxi and a normal car. In the taxi (Public transport) you can hop in and start asking and directing the taxi anywhere while in the private car, you can’t do that unless you are somehow related to the driver. Same goes here in AS3, public functions / methods / variables… are accessible by all… meaning declaring the leftdown and rightdown as public will enable other classes to access to it. If this sounds confusing, it’s time for your another best friend… google.  hehe… for more information. Anyway lets get back…&lt;br /&gt;&lt;br /&gt;You need to put the event listerners to run whenever the class initializes / started so it should be in the constructor &lt;strike&gt;Constructicons merged to form Devastator.. muahahaha and kill those puny Autobots…&lt;/strike&gt; like this…&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKeyDown);&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_UP, listenKeyUp);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Also note that those pesky listeners calls ‘listenKeyDown’ and ‘listenKeyUp’ functions. Lets code those functions…&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt; public function listenKeyDown(event:KeyboardEvent)&lt;br /&gt; {&lt;br /&gt;  if (event.keyCode == 37) { //Left arrow&lt;br /&gt;   leftdown = true;&lt;br /&gt;  }&lt;br /&gt;  if (event.keyCode == 39) { //Right arrow&lt;br /&gt;   rightdown = true;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; public function listenKeyUp(event:KeyboardEvent)&lt;br /&gt; {&lt;br /&gt;  if (event.keyCode == 37) { //Left arrow&lt;br /&gt;   leftdown = false;&lt;br /&gt;  }&lt;br /&gt;  if (event.keyCode == 39) { //Right arrow&lt;br /&gt;   rightdown = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It you notice carefully, these are the same codes we coded from the previous tutorials, we are only rearranging them in classes. Try to run the test movie. You will get an error! Why? Because unlike the codes we put in the timeline, we need to import the flash.events.*, so that the event listerner, keyboard events and other events related stuffs can work.&lt;br /&gt;&lt;br /&gt;The AS307.as file should look like this…&lt;br /&gt;&lt;br /&gt;Filename : AS307.as&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package {&lt;br /&gt; import flash.display.*;&lt;br /&gt; import flash.events.*;&lt;br /&gt;&lt;br /&gt; public class AS307 extends MovieClip{&lt;br /&gt;&lt;br /&gt; var leftdown,rightdown:Boolean = false;&lt;br /&gt;&lt;br /&gt;  public function AS307(){&lt;br /&gt;&lt;br /&gt;     stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKeyDown);&lt;br /&gt;     stage.addEventListener(KeyboardEvent.KEY_UP, listenKeyUp);&lt;br /&gt;&lt;br /&gt;     var clownShip:myShip = new myShip(stage.stageWidth/2,stage.stageHeight - 40);&lt;br /&gt;     addChild(clownShip);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  public function listenKeyDown(event:KeyboardEvent)&lt;br /&gt;  {&lt;br /&gt;   if (event.keyCode == 37) { //Left arrow&lt;br /&gt;    leftdown = true;&lt;br /&gt;   }&lt;br /&gt;   if (event.keyCode == 39) { //Right arrow&lt;br /&gt;    rightdown = true;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  public function listenKeyUp(event:KeyboardEvent)&lt;br /&gt;  {&lt;br /&gt;   if (event.keyCode == 37) { //Left arrow&lt;br /&gt;    leftdown = false;&lt;br /&gt;   }&lt;br /&gt;   if (event.keyCode == 39) { //Right arrow&lt;br /&gt;    rightdown = false;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now that we are done for AS307.as, we move on to myShip.as. As we are going to add event listerners and use timer objects for the movement, we need to import…&lt;br /&gt;&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt; import flash.events.*;&lt;br /&gt; import flash.utils.getTimer;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;.. add an event listerner (oh man this tutorial is getting lengthy…) and the function called by the event listener.&lt;br /&gt;&lt;br /&gt;The whole file should look like this…&lt;br /&gt;&lt;br /&gt;Filename : myShip.as&lt;br /&gt;&lt;pre class="”prettyprint”"&gt;&lt;br /&gt;package{&lt;br /&gt; import flash.display.*;&lt;br /&gt; import flash.events.*;&lt;br /&gt; import flash.utils.getTimer;&lt;br /&gt;&lt;br /&gt; public class myShip extends MovieClip{&lt;br /&gt;  private var timeVal:int;&lt;br /&gt;&lt;br /&gt;  public function myShip(x,y){&lt;br /&gt;   this.x = x;&lt;br /&gt;   this.y = y;&lt;br /&gt;  &lt;br /&gt;   addEventListener(Event.ENTER_FRAME,moveClownShip);&lt;br /&gt;  }&lt;br /&gt;  public function moveClownShip(event:Event) {&lt;br /&gt;   var speed:Number = 110.0;&lt;br /&gt;   var timeDiff:int = getTimer()-timeVal;&lt;br /&gt;   timeVal += timeDiff;&lt;br /&gt;     &lt;br /&gt;   if (MovieClip(parent).leftdown == true){&lt;br /&gt;    this.x -= speed*timeDiff/1000;&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;   if (MovieClip(parent).rightdown == true){&lt;br /&gt;    this.x += speed*timeDiff/1000;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Run the finish product. You should get exactly what you got when you program it in the timeline in the previous tutorial. The only difference here is the codes are now in classes instead of timeline. It requires a bit more work but the result is &lt;strike&gt;exactly the same what good is this anyway I just wasted my time…?&lt;/strike&gt;err … I guess that pretty much intro you to classes. Try to take a look see and reread this &lt;strike&gt;again and again&lt;/strike&gt; a few times until you get the picture &lt;strike&gt;/connection to the karma which holds the tsunami tank together… damn Red Alert 3.&lt;/strike&gt; In the next tutorial we are going to make the clownShip &lt;strike&gt;spit I mean&lt;/strike&gt; shot bullets upward. These are going to be in classes of course.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-3937946571081912436?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/3937946571081912436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=3937946571081912436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3937946571081912436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3937946571081912436'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/as3-07-classes-your-best-friend.html' title='AS3 07 – Classes, your best friend'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_gbcDMCBsDoA/SRAPfvuu8DI/AAAAAAAAACs/L59PNPLkCjI/s72-c/timeline.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-9108397280407370755</id><published>2008-11-03T11:01:00.009+08:00</published><updated>2008-11-03T11:33:34.432+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Testing of Syntax Highlighter</title><content type='html'>This is a test for the syntax highlighter...&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;function listenKeyDown(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt; if (event.keyCode == 37) { //Left arrow&lt;br /&gt;  leftdown = true;&lt;br /&gt; }&lt;br /&gt; if (event.keyCode == 39) { //Right arrow&lt;br /&gt;  rightdown = true;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Damn the colours doesn't work... or do they? Anyway let's just stick with this for a while ya. :) If anyone is interested, I am using 'prettifier' yeah sounds feminine... which can be seen here &lt;a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html" target="_new"&gt;http://google-code-prettify.googlecode.com/svn/trunk/README.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I had to copy and paste the codes within the blog Layout-&gt;Edit HTML area since I do not want to link to any other host and blogspot does not allow any uploading of .css and .js files. I hope with this 'prettifier' things will start to look &lt;strike&gt;good&lt;/strike&gt; better. :) (PS : If it's all messed up on other browsers, please please please tell me... thank you.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-9108397280407370755?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/9108397280407370755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=9108397280407370755' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/9108397280407370755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/9108397280407370755'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/testing-of-syntax-highlighter.html' title='Testing of Syntax Highlighter'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7187675713065426741</id><published>2008-11-03T09:20:00.004+08:00</published><updated>2008-11-03T09:29:47.140+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 06 - Time based animation'/><title type='text'>AS3 06 - Time based animation, My clownShip</title><content type='html'>Previously &lt;strike&gt;on X-Men, we see Professor X-Xavier being beaten to pulp…&lt;/strike&gt; we managed to get a character on screen (clownShip) and control it with the keyboard (left and right arrow). We learned how to listen for events and call functions whenever the events occur. However we noticed that it’s not ‘behaving’ like a normal ship in any arcade game. It’s sluggish and there is a strange interval between the first and second keys before it starts to move continuously. Now lets make it smoother. Instead of moving the ship with each time the key press is detected, why not we create a switch which alternates between ‘move’ and ‘stop’… sounds confusing? Why not we have a switch which sets to ‘move’ when we first hit the arrow key (KEP_DOWN) and ‘stop’ when the key is release (KEY_UP). Let’s call the switch leftdown and rightdown and declare it as …&lt;br /&gt;&lt;br /&gt;var leftdown:Boolean = false;&lt;br /&gt;var rightdown:Boolean = false;&lt;br /&gt;&lt;br /&gt;What’s a Boolean? It can only hold ‘true’ or ‘false’ which is suitable for what we want now. If we hold the left arrow down, then we set the leftdown to ‘true’, if we release the key (let go), we set the leftdown to ‘false’. In order to do that we need to change the event listeners for the keyboard.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKeyDown);&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_UP, listenKeyUp);&lt;br /&gt;&lt;br /&gt;function listenKeyDown(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;if (event.keyCode == 37) { //Left arrow&lt;br /&gt;leftdown = true;&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 39) { //Right arrow&lt;br /&gt;rightdown = true;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function listenKeyUp(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;if (event.keyCode == 37) { //Left arrow&lt;br /&gt;leftdown = false;&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 39) { //Right arrow&lt;br /&gt;rightdown = false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;That should get rid of the loop interval at the start.&lt;br /&gt;&lt;br /&gt;Now that we have the alternating switch for the movement, we need to actually move the clownShip based on the Boolean value. Here we add another event listener to run at each frame with the Event.ENTER_FRAME and call the moveClownShip function.&lt;br /&gt;&lt;br /&gt;addEventListener(Event.ENTER_FRAME, moveClownShip);&lt;br /&gt;function moveClownShip(event:Event) {&lt;br /&gt;if (leftdown == true){&lt;br /&gt;clownShip.x = clownShip.x - 10&lt;br /&gt;}&lt;br /&gt;if (rightdown == true){&lt;br /&gt;clownShip.x = clownShip.x + 10&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Try to test the move now. It’s smoother now isn’t it? There is something still not right here. What we did so far is program based on frame rate. What this means is the clownShip’s movement is directly linked to the number of frames this Flash document is currently running in per second. Basically it’s 24 FPS (frames per second). Where did I get this? It’s a default framerate set by Flash if you start a new document which can be seen at the document properties section.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264235689448471746" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 250px; CURSOR: hand; HEIGHT: 323px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/SQ5Sd-uCfMI/AAAAAAAAACc/fAdKoO-A6T8/s400/fps.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Basically the Event.ENTER_FRAME runs every frame so the higher the framerate the more times this is triggered. Try increasing the FPS and run the test movie. Move the clownShip around. It moves faster!!!... not smoother. . What we are going to do next is to alter the programming structure to base on time instead of frame. This is very important as this enables control of the animation based on the time passed no matter how slow it takes for the PC to render the image. &lt;strike&gt;Duh?&lt;/strike&gt; Ok… try this… when you play single player Diablo &lt;strike&gt;(that’s so olddd…)&lt;/strike&gt; on an old PC with below minimum requirement, the games slows down but you still get all the animation frames being viewable and all… (much like when you set the Flash FPS to 1) but when you play multiplayer Diablo it skips the frames and keep up with time yeah… that’s it… &lt;strike&gt;whatever…&lt;/strike&gt;. Ok.. I think DoTA would be a better example. Once a while you will experience frame skipping within the game. This needs to happen because the game is trying to keep up (sync) with the rest of the clients (players) based on time. If it’s based on frame, the moment one PC slows down, the synchronization is gone. &lt;strike&gt;Am I making any sense???... aii… forget it&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;First we need a placeholder (variable) to hold time values. Let’s call it timeVal and define it…&lt;br /&gt;&lt;br /&gt;var timeVal:int;&lt;br /&gt;&lt;br /&gt;Now we need to alter the moveClownShip function as below…&lt;br /&gt;&lt;br /&gt;function moveClownShip(event:Event) {&lt;br /&gt;&lt;br /&gt;var speed:Number = 110.0;&lt;br /&gt;var timeDiff:int = getTimer()-timeVal;&lt;br /&gt;timeVal += timeDiff;&lt;br /&gt;&lt;br /&gt;if (leftdown == true){&lt;br /&gt;clownShip.x -= speed*timeDiff/1000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (rightdown == true){&lt;br /&gt;clownShip.x += speed*timeDiff/1000;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Confused already? Instead of fixing the movement to 10 pixels per frame (previously), now we get the time difference between each frame&lt;br /&gt;&lt;br /&gt;var timeDiff:int = getTimer()-timeVal;&lt;br /&gt;&lt;br /&gt;and move the clownShip to their appropriate horizontal location based on the time passed from previous frame.&lt;br /&gt;&lt;br /&gt;clownShip.x -= speed*timeDiff/1000;&lt;br /&gt;&lt;br /&gt;Why divide it by 1000? Well, getTimer() returns the current time value in milliseconds so I am merely converting it back to seconds. Just like 1 meter = 100 centimeter = 1000 milimeters, hmm.. that should give us 1 second = 1000 miliseconds. With the speed value of 110, that means I am trying to make the clownShip move 110 pixel per second. Now try running the test movie at FPS of 1,30,60,120 moving the clownShip across the screen. Note that they all took &lt;strike&gt;approx&lt;/strike&gt; 5 seconds to complete. This would be completely different if the movement was based on frame instead of time. Also note that at around 60 frames per seconds it smooth as silk  Higher framerates are have not so noticeable increase in smoothness &lt;strike&gt;unless you have superior/bionic eye/brain.&lt;/strike&gt; For your info.. your cinema operates at 24fps, television 30 fps and you monitor / LCD probably gets 90 Hertz as the refresh rate. So your fps is actually capped by the display device you are using . Also films in cinema achieve such smoothness because of motion blur.. &lt;strike&gt;a topic which I will only go into when I talk about Lightwave 3D some err… &lt;/strike&gt;. Anyway if all things go right, the final stuff should look something like this.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5264235687012088578" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 327px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/SQ5Sd1pKOwI/AAAAAAAAACk/nn_KYvXsSOM/s400/as3-06.jpg" border="0" /&gt;&lt;br /&gt;The whole code is as below :&lt;br /&gt;&lt;br /&gt;var clownShip:myShip = new myShip;&lt;br /&gt;clownShip.x = stage.stageWidth/2;&lt;br /&gt;clownShip.y = stage.stageHeight - 40;&lt;br /&gt;var leftdown:Boolean = false;&lt;br /&gt;var rightdown:Boolean = false;&lt;br /&gt;var timeVal:int; // animation time&lt;br /&gt;&lt;br /&gt;addChild(clownShip);&lt;br /&gt;&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKey);&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_UP, listenKeyUp);&lt;br /&gt;&lt;br /&gt;function listenKey(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;if (event.keyCode == 37) { //Left arrow&lt;br /&gt;leftdown = true;&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 39) { //Right arrow&lt;br /&gt;rightdown = true;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function listenKeyUp(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;if (event.keyCode == 37) { //Left arrow&lt;br /&gt;leftdown = false;&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 39) { //Right arrow&lt;br /&gt;rightdown = false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;addEventListener(Event.ENTER_FRAME, moveClownShip);&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;function moveClownShip(event:Event) {&lt;br /&gt;if (leftdown == true){&lt;br /&gt;clownShip.x = clownShip.x - 10&lt;br /&gt;}&lt;br /&gt;if (rightdown == true){&lt;br /&gt;clownShip.x = clownShip.x + 10&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function moveClownShip(event:Event) {&lt;br /&gt;&lt;br /&gt;var speed:Number = 110.0;&lt;br /&gt;var timeDiff:int = getTimer()-timeVal;&lt;br /&gt;timeVal += timeDiff;&lt;br /&gt;&lt;br /&gt;if (leftdown == true){&lt;br /&gt;clownShip.x -= speed*timeDiff/1000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (rightdown == true){&lt;br /&gt;clownShip.x += speed*timeDiff/1000;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;One more thing the /* and */ serves as the opening and closing of comments in AS3.&lt;br /&gt;&lt;br /&gt;Well, I hope you grab the difference between frame based and time based animation programming. This tutorial has been quite confusing &lt;strike&gt;to write&lt;/strike&gt; for some. Next I am going to talk about how we are going to rearrange these stuffs into classes. Well, you can’t actually escape from classes, from school classes to C++ … classes are there to stay. We need them to keep things organize if we are going to do anything bigger than moving single object &lt;strike&gt;with our thoughts and balance ourselves with one hand&lt;/strike&gt; around and also it’s the OOP (object oriented programming – I can see you all yawning now) way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7187675713065426741?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7187675713065426741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7187675713065426741' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7187675713065426741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7187675713065426741'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/11/as3-06-time-based-animation-my.html' title='AS3 06 - Time based animation, My clownShip'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/SQ5Sd-uCfMI/AAAAAAAAACc/fAdKoO-A6T8/s72-c/fps.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-8353673457296489708</id><published>2008-10-31T14:48:00.005+08:00</published><updated>2008-11-03T09:19:53.962+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Why this? FPS? Frame?</title><content type='html'>Well, I have browsed a lot... and have read many tutorials about Flash. I am taking a less serious approach here while contributing my part. These tutorials I am writing here are going to be long and rather basic. I am learning as I am writing this too :) I will go from concept to code and even focused on possible mistakes and shortcomings of the codes whenever possible.&lt;br /&gt;&lt;br /&gt;Unlike other tutorials, I write lots of gibberish here, so please bear with me. There will bound to be gramatical mistakes here and there but as long as you get what I am trying to say, it should be ok. Meanwhile I hope you all won't maul me for not having a tutorial today hahahaha... whoopps... don't worry. Coming soon.&lt;br /&gt;&lt;br /&gt;Once more thing, I do not publish during weekends. It's because &lt;strike&gt;I am a lazy bonehead&lt;/strike&gt; I need err.. time to think of what to write... yeah so that you all can benifit ... err better future... something like that.&lt;br /&gt;&lt;br /&gt;Anyway since I am not writing any tutorials todays, I might as well just briefly talk about Flash a little. Who knows what FPS stands for? Whenever you start a document in Flash if you look at the document properties, you are bound to find FPS there... FPS is actually First Person Shooter so kinda get to er.. shoot people in Flash. The higher the rate, the more bullets you get to shoot... NOT. FPS here actually stands for Frame Per Seconds. It is the rate at which the number of frames is shown in 1 second. The higher the framerate of the FPS, the smoother the animation. Now please don't go and change it insanely high like 120 (max for Flash) thinking you get superior smoothness and all shall bow to your animation... Take note that cinema runs at 24 FPS and your television goes 30 FPS. The human eye can be tricked to see smooth / fluid movement with 24 frames per second. In other words, you won't benifit much by putting the framerate to 120 frames per second. Then how come NVIDIA is boosting about how games like F.E.A.R can perform over 160 fps with their GeForce 8800GTX... Yes that's good... very good... they are trying to tell us how powerful their graphic processor can go but do you know that not all games are able to run that way? For example, GTA (Grand Theft Auto) have a standard 30 fps. It can't run properly with frames more than that without killing itself... why? Try running the previous tutorial with the settings of 120 FPS. The clownship got a huge speedboost :).. almost uncontrollable... it's the programming that counts. What we did was we programmed based on frames instead of time, so the higher the framerate, the faster the game. I will talk about this in my next tutorial :) Hohoho... now look at your monitor / LCD panel, what is the highest 'Screen Refresh Rate' does your monitor / LCD panel supports? 90 Hertz? Hohoh... (Christmas in 2 month's time...) That equals to the maximum of 90 frames displayed per second :) So even if your F.E.A.R runs at 160 FPS, you can't see it. It's capped by the limitation fo the display device.&lt;br /&gt;&lt;br /&gt;So that's it today. I hope this post is as informative as the grass growing on your lawn.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-8353673457296489708?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/8353673457296489708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=8353673457296489708' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8353673457296489708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/8353673457296489708'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/why-this-fps-frame.html' title='Why this? FPS? Frame?'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2056025566925283626</id><published>2008-10-30T17:51:00.005+08:00</published><updated>2008-10-30T18:01:41.458+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 05 - My first interactive ship'/><title type='text'>AS3 05 - Interactivity with stage. My First spaceship</title><content type='html'>We have learned how to trace to the output tab, how to listen to keyboard strokes and how to create symbols and create instances in the stage in AS3. In this tutorial we will look into interactivity in the stage. It’s simply a combination of previous tutorials so just take a look see at them if you find this one rather err.. confusing.&lt;br /&gt;&lt;br /&gt;Create a new Flash File. Draw a simple &lt;strike&gt;clown&lt;/strike&gt; ship shape on stage. Mine look like this…&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262883776403299170" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 159px; CURSOR: hand; HEIGHT: 110px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SQmE6SKvW2I/AAAAAAAAACM/YVyqpZdLkPw/s400/myship.jpg" border="0" /&gt;&lt;br /&gt;Not much of a &lt;strike&gt;clown&lt;/strike&gt; ship but it will do. Convert it to symbol with ‘Export for ActionScript’ and put the name ‘myShip’ for the clown… I mean ship. Now once converted, it should appear in the library like this…&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262883783128845074" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 250px; CURSOR: hand; HEIGHT: 315px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SQmE6rOPCxI/AAAAAAAAACU/z9hpUQMJ_MQ/s400/myshiplibrary.jpg" border="0" /&gt;&lt;br /&gt;Now delete the original shape on stage. Yes… delete it! Select it and delete. Don’t worry… it has been immortalized in the form of a symbol in the library… well until you delete the symbol.. hmmm. Ok now the stage is empty. We will use AS3 to fill it with the &lt;strike&gt;clown&lt;/strike&gt; ship.&lt;br /&gt;&lt;br /&gt;Right click and select ‘Action’ on Frame1 to bring up the ActionScript Editor. (Actually this is not the best way to do this… I will explain in future &lt;strike&gt;like few years down the road.&lt;/strike&gt; but it should be ok for now). Create an instance of the clown ship on stage.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;var clownShip:myShip = new myShip; //yes… the name clownship is catching on!!!&lt;br /&gt;addChild(clownShip);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;‘//’ Simply puts the characters after ‘//’ as comment until the end of line. It’s good for &lt;strike&gt;forgetful&lt;/strike&gt; programmers to comment so that they may refer to their codes easily &lt;strike&gt;and equally easy to be stolen and reuse… &lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;You can test the movie now by pressing ‘CTRL+ENTER’. Your clownship appears to be on top left corner of the stage. Position it near bottom middle…&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;clownShip.x = stage.stageWidth/2;&lt;br /&gt;clownShip.y = stage.stageHeight - 40; &lt;/blockquote&gt;&lt;br /&gt;Now this will cause a little overhead to the processing power. Why? Because we could have set the x (horizontal) and y (vertical) position of the clownShip before we add it into the stage (addChild). Currently we add it to stage (default at 0,0) then move it to half of the stage’s width and 40 pixel from the bottom of the stage.. meaning the flash player needs to first position it at 0,0 and then reposition it at stageWidth/2, stage.stageHeight-40…. 2 steps of rendering the &lt;strike&gt;clown&lt;/strike&gt; shape on stage.&lt;br /&gt;&lt;br /&gt;We could go around this by re-arranging the codes as below&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;var clownShip:myShip = new myShip;&lt;br /&gt;clownShip.x = stage.stageWidth/2;&lt;br /&gt;clownShip.y = stage.stageHeight - 40;&lt;br /&gt;&lt;br /&gt;addChild(clownShip);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This way, the flash player only needs to render the clownShip once at stageWidth/2, stage.stageHeight-40.&lt;br /&gt;&lt;br /&gt;Big deal, we got tons of processing power… that’s what we all thought. But it is these small things that eat up the processing power itty bitty by itty bitty and if you loop the above statement by 1000 times, those will be an additional 1000 steps the flash player needs to take. Now, &lt;strike&gt;since the force is strong with this clown…,&lt;/strike&gt; once we got the clownShip where we wanted it to start with, we need to add an event listener. You do remember how to do that don’t you? In the AS editor, add in these lines of &lt;strike&gt;wisdom&lt;/strike&gt; codes.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;stage.addEventListener(KeyboardEvent.KEY_DOWN, listenKey); &lt;/blockquote&gt;The listener will call the function listenKey each time a key is pressed. Now lets put in the listenKey function…&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;function listenKey(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;if (event.keyCode == 32) {&lt;br /&gt;trace('I have pressed the spacebar');&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This function receives keyboard event and if you look carefully the keyboard keys are referred to by numbers. It’s ok, you just need to memorize all keys and their corresponding key code (keyCode). For example, the ‘spacebar’ holds the keyCode of 32, the ‘up arrow’ holds 38, down 40, left 37 and right 39. Now if you got a key which you would like to find out its key code, you can add this line to the code…&lt;br /&gt;&lt;br /&gt;trace(event.keyCode);&lt;br /&gt;&lt;br /&gt;…in the listenKey function. So basically the function would look like this…&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;function listenKey(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;trace(event.keyCode);&lt;br /&gt;if&lt;br /&gt;(event.keyCode == 32) {&lt;br /&gt;trace('I have pressed the spacebar');&lt;br /&gt;}&lt;br /&gt;} &lt;/blockquote&gt;Try to test run the movie, remember to check the ‘Disable Keyboard Shortcut’ from the test movie window and press any key to see their corresponding key codes being displayed in the output (debug) window in the flash app. Hmm…. There is another thing called charCode instead of keyCode. Try reading about it in the help section. &lt;strike&gt;Now that was redundant… &lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;By now you should be able to know whichever key codes for any keys you wish to know to really want to know, you know. Now lets move on to moving the clown left and right via the keyboard. First you detect the left and right arrow keys…&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;function listenKey(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;if (event.keyCode == 32) {&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 37) { //Left arrow&lt;br /&gt;}&lt;br /&gt;if (event.keyCode ==&lt;br /&gt;39) { //Right arrow&lt;br /&gt;}&lt;br /&gt;} &lt;/blockquote&gt;…then you add or minus from the current clown’s horizontal position… here…&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;function listenKey(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;// trace(event.keyCode);&lt;br /&gt;if (event.keyCode == 32) {&lt;br /&gt;// trace('I have pressed the spacebar');&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 37) { //Left arrow&lt;br /&gt;clownShip.x = clownShip.x&lt;br /&gt;- 3&lt;br /&gt;}&lt;br /&gt;if (event.keyCode == 39) { //Right arrow&lt;br /&gt;clownShip.x =&lt;br /&gt;clownShip.x + 3&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;What happened here is I minus the x position of the clownShip by 3 pixels whenever I press the left key and add 3 pixels to it whenever I press the right key. What are pixels you say? They are &lt;strike&gt;actually related to pixies, fairies and all sorts of mythical beast as if I know lots about…&lt;/strike&gt; tiny dots on screen. Your screen resolution goes by pixels, 800x600, 1024x780… stuffs like that.&lt;br /&gt;&lt;br /&gt;Now try to test run the movie. Move the clown around. Does it work? Well if it does, it is not looking good. A bit on the sluggish side I would say, especially on the start. Well, what went wrong? &lt;strike&gt;The whole damn tutorial went wrong!&lt;/strike&gt; What happened was the delayed input of the keyboard thanks to the operating system… (yes blame it on Microsoft) … actually it’s because of these features you don’t get mulllltiiipllleee letters appearing when we type something. Now let’s make that point valid. Open your ‘Notepad’ and hold down a key…. you notice that it repeats only after certain interval. That was what was happening. We will er… tackle this issue &lt;strike&gt;once I find out&lt;/strike&gt; in the next tutorial. Meanwhile try to make the clown move up and down.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2056025566925283626?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2056025566925283626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2056025566925283626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2056025566925283626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2056025566925283626'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/as3-05-interactivity-with-stage-my.html' title='AS3 05 - Interactivity with stage. My First spaceship'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_gbcDMCBsDoA/SQmE6SKvW2I/AAAAAAAAACM/YVyqpZdLkPw/s72-c/myship.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7460948596906343832</id><published>2008-10-30T16:40:00.005+08:00</published><updated>2008-11-03T09:26:15.518+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS3 04 - More About Instances'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><title type='text'>AS3 04 - More About Instances</title><content type='html'>From the previous post… what we have done is adding a rectangle manually in the stage and repositioning it via AS3. What if we want to add additional rectangle? Are we going to draw it out one by one? In a game, we are most likely to add enemies… waves and waves of enemies. We draw / import a sample enemy (in this case… a movieclip we created earlier called ‘myRect’) into the library and make copies (instances) of them on the fly on the stage whenever we need them. Get it? I just referred to the movieclip = sample enemy and instances = copies of enemies.&lt;br /&gt;Now in order to make copies of the enemies we need to refer to the original sample enemy (in the library called ‘myRect’ – remember we tick on the ‘Export for ActionScript’ when we created the ‘myRect’ symbol? Take note on the class name on the Linkage section because that’s the class we are refering to. What do you mean no?). Here we create the new instance from ‘myRect’ with the name of ‘myRectIn2’&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;var myRectIn2:myRect = new myRect();&lt;/blockquote&gt;&lt;br /&gt;Now that we have the name of the second rectangle, we can reposition it like what we did with the first one.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;myRectIn2.x = 200;&lt;br /&gt;myRectIn2.y = 200;&lt;/blockquote&gt;&lt;br /&gt;Now the second rectangle is not gonna be displayed on the stage unless we add it into the stage thus….&lt;br /&gt;&lt;blockquote&gt;addChild(myRectIn2);&lt;/blockquote&gt;&lt;br /&gt;or&lt;br /&gt;&lt;blockquote&gt;stage.addChild(myRectIn2);&lt;/blockquote&gt;&lt;br /&gt;whichever you prefer… they both work… which brings to the point that what I wrote here isn’t necessarily the only method to achieve similar results.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262864577423119490" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 300px; CURSOR: hand; HEIGHT: 245px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SQlzcwZKlII/AAAAAAAAACE/wztNK6NIIY8/s400/instancesymbol.jpg" border="0" /&gt;&lt;br /&gt;This article has been brief &lt;strike&gt;because I am lazy&lt;/strike&gt; not because I am lazy but I would like to streesss on the importance of not mixing or confused symbols reference in the library with instances references of the symbols &lt;strike&gt;because I always make this mistake when I started out&lt;/strike&gt; and therefore they deserve an entire post for it.. (other than the one before this) err.. themselves...hmm. You will need to use these lots in future if you are &lt;strike&gt;interested to read more of my rumblings&lt;/strike&gt; to pursue a higher &lt;strike&gt;karma&lt;/strike&gt; understanding of stuffs yet to come. &lt;strike&gt;What the??&lt;/strike&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7460948596906343832?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7460948596906343832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7460948596906343832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7460948596906343832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7460948596906343832'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/as3-04-more-about-instances.html' title='AS3 04 - More About Instances'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_gbcDMCBsDoA/SQlzcwZKlII/AAAAAAAAACE/wztNK6NIIY8/s72-c/instancesymbol.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-3043145846921583324</id><published>2008-10-29T10:07:00.000+08:00</published><updated>2008-10-29T09:02:17.264+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 03 - Instance'/><title type='text'>AS3 03 - On stage instance</title><content type='html'>My previous post deals with tracing items in the output window and getting the input from keyboard presses. Now those are &lt;strike&gt;great for filling in blog spaces&lt;/strike&gt; basics that well err... need for er... basic understandings. Now that you know that the event listeners are the way to go, you can now start to add stuffs to the stage and making them move about.&lt;br /&gt;&lt;br /&gt;Here is what we are going to do in this tutorial.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First we go about adding an item to the stage&lt;/li&gt;&lt;li&gt;Next, we script in AS3 to perform certain things to the item on stage&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Simple stuffs? &lt;strike&gt;Yeah right.&lt;/strike&gt; Let's start shall we?&lt;br /&gt;&lt;br /&gt;Start with a new Flash File (ActionScript 3.0). Draw something on the stage. Anything at all... well not really anything... A simple circle or square would be nice. Well, mine is a rectangle and it looks like this...&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262131581617883538" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 35px; CURSOR: hand; HEIGHT: 39px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/SQbYyyOyyZI/AAAAAAAAABc/c2jxaEClc_U/s400/reac.jpg" border="0" /&gt;&lt;br /&gt;Now 'right click' on the perfect looking triangle... I mean rectangle and choose the 'Convert to Symbol' option.&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262131582666636658" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 315px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SQbYy2I1fXI/AAAAAAAAABU/zfvnrbrRMeU/s400/symbol.jpg" border="0" /&gt;&lt;br /&gt;Next, name the symbol as 'myRect' &lt;strike&gt;follow this name or die!!!&lt;/strike&gt; for convinience sake. &lt;strike&gt;(Sake? or sake as in sa ke for Japanese rice wine?). &lt;/strike&gt;Make sure to 'check/tick' the checkbox for 'Export for ActionScript' so that we can refer to the item in AS3 &lt;strike&gt;instead of mindlessly wondering around what went wrong later on. &lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262134458163433842" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 302px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SQbbaOMskXI/AAAAAAAAABs/CvimmwTTzIg/s400/myRect.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Now try this...&lt;br /&gt;&lt;br /&gt;Open up the ActionScript Editor for Frame1 and type in...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;myRect.x = 100;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;The rectangle should move to 100px from the left of the stage. Well does it happen? What you get from that is an &lt;b&gt;error&lt;/b&gt;. This is one of the common error poeple faces when starting out scripting (well at least that was what happned to me...) What happened was the script was trying to refer to an instance in the stage while you actually is trying to point to the movieclip in the library. You need to name the instance of the movieclip you created which resides on the stage. Confuse now? If you look at the image below, you can notice when you click on the myRect instance on stage, the properties on the left shows &lt;Instance Name&gt;. Type in 'myRectIn' to name the instance of the myRect which is on the stage.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262140491359414546" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 246px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_gbcDMCBsDoA/SQbg5ZmtaRI/AAAAAAAAAB0/kJfYqLnSShY/s400/instance.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Once done, you may type in &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;myRectIn.x = 100;&lt;/blockquote&gt;&lt;br /&gt;It works! Now the rectangle is paced 100 pixel from the left of the stage. I hope you grab this concept of &lt;b&gt;MovieClip and Instance on and off stage&lt;/b&gt;. This is by far considered very dear and costly if you didn't really grab what I am trying to put forward here. &lt;strike&gt;I will end here so that you can think about your future instead of reading this...&lt;/strike&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-3043145846921583324?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/3043145846921583324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=3043145846921583324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3043145846921583324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3043145846921583324'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/as3-03-on-stage-instance.html' title='AS3 03 - On stage instance'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/SQbYyyOyyZI/AAAAAAAAABc/c2jxaEClc_U/s72-c/reac.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2927749524484473052</id><published>2008-10-28T16:59:00.003+08:00</published><updated>2008-10-28T17:03:44.621+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Gosh... no files...</title><content type='html'>Recently &lt;strike&gt;(how embarassing)&lt;/strike&gt;, I have come to realised that I cannot upload any files other than pictures to blogspot. This has been a real pain as I was so willing to share my flash scripting .fla files... &lt;strike&gt;but too bad&lt;/strike&gt; Alas this will not deter my err... determination... I will still blog about flash. Now what was it I am supposed to write after this paragraph?... hmm... makes me wonder...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2927749524484473052?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2927749524484473052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2927749524484473052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2927749524484473052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2927749524484473052'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/gosh-no-files.html' title='Gosh... no files...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-3356851669039775914</id><published>2008-10-28T15:50:00.006+08:00</published><updated>2008-10-29T08:49:24.179+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 02 - Listening to Keyboard'/><title type='text'>AS3 02 - Listening to Keyboard...</title><content type='html'>Now that we have a basic idea of starting and writing a simple trace feature in CS4 [&lt;a href="http://winterglass.blogspot.com/2008/10/very-basic-of-as3-very-very-very-hello.html"&gt;in the previous post&lt;/a&gt;], let's move on to something more interactive. Instead of tracing out the 'Hello World' all the time... let's make flash trace out based certain &lt;strike&gt;vulgar&lt;/strike&gt; words of wisdom whenever we hit certain key.&lt;br /&gt;&lt;br /&gt;Now.. shall we start &lt;strike&gt;bratss&lt;/strike&gt; ladies and gentlement? Let's start with the opening of Flash CS3/4 .... blah blah... up until the part where you already know to bring out the AS editor.&lt;br /&gt;&lt;br /&gt;Now before we proceed further let me &lt;strike&gt;tell you a story of a &lt;/strike&gt;enlighten you on certain things which are primarily improtant in AS3. The blank screen which appears everytime you startup Flash is referred to as 'stage' by the AS. You can get the width of the flash document by tracing out "stage.stageWidth"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262114146704600770" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 336px; CURSOR: hand; HEIGHT: 78px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/SQbI78HirsI/AAAAAAAAABE/9H9juu77goI/s400/stagewidth.jpg" border="0" /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262114146652005362" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 343px; CURSOR: hand; HEIGHT: 73px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SQbI777AI_I/AAAAAAAAAA8/WVqOQCV_VrA/s400/stageWidthCode.jpg" border="0" /&gt;&lt;br /&gt;Referring to the title of this post, I guess you should be wondering what does this have anything to do with the so call 'stage'? Well, the stage is where everything happens.. (not really true but it's a good way to think about this now... ). The stage needs to listen for any events that happen. I repeat... the &lt;b&gt;stage&lt;/b&gt; needs to &lt;b&gt;listen&lt;/b&gt; to &lt;b&gt;events&lt;/b&gt; that happen... the &lt;b&gt;STAGE LISTENS&lt;/b&gt; to &lt;b&gt;EVENTS&lt;/b&gt; that happen... I think by now you should get the degree of the importance of that statement. What does this 'stage' listen to anyway? Well, for starters, keystrokes...&lt;br /&gt;&lt;br /&gt;How do we have this 'stage' listens to keystrokes? We simply add an event listener...&lt;br /&gt;yeah it's that simple... not...&lt;br /&gt;you add this line into the AS editor&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;stage.addEventListener(KeyboardEvent.KEY_DOWN, displayPress);&lt;br /&gt;function displayPress(event:KeyboardEvent)&lt;br /&gt;{&lt;br /&gt;trace('Press');&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;What happens here is the 'stage' has been added a listener... which is the 'KeyboardEvent.KEY_DOWN' It listens to the keyboard events and wait for each key presses through the 'KEY_DOWN'. When the 'stage' hears a 'KEY_DOWN' pressing of a key by the user, it calls the 'displayPress' function. The 'displayPress' function traces out the word 'Press' to the output window.&lt;br /&gt;&lt;br /&gt;So run test the script and press the 'spacebar' you can see the word 'Press' appears each time you press the 'spacebar'.&lt;br /&gt;&lt;br /&gt;You might be wondering 'Eh? How come only the spacebar works? I didn't specifically listen only to the spacebar...' Well, there is a truth in this... when running in test movie mode, many of the shortcut keys still point back to the main Flash App window. To disable this while testing a movie, simply run the test and go to 'Control-&gt;Disable Keyboard Shortcut'. Try pressing any keys now... you get the idea? &lt;img id="BLOGGER_PHOTO_ID_5262371187639632514" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 300px; CURSOR: hand; HEIGHT: 190px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_gbcDMCBsDoA/SQeytsOCwoI/AAAAAAAAAB8/45cqN8l4k1E/s400/keyboardshortcut.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262123554927669154" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 226px; CURSOR: hand; HEIGHT: 111px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SQbRfket76I/AAAAAAAAABM/RHiOizglsi8/s400/press.jpg" border="0" /&gt;&lt;br /&gt;Oh... and all said and done if you somehow have problem running the script, just take into consideration that AS3 is &lt;b&gt;CASE SENSITIVE&lt;/b&gt;! This means keywords like KeyboardEvent is spelled with the capital intact. &lt;strike&gt;Do not ask me why.. as if I am responsible for the damn AS3 language..... &lt;/strike&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-3356851669039775914?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/3356851669039775914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=3356851669039775914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3356851669039775914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3356851669039775914'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/as3-02-listening-to-keyboard.html' title='AS3 02 - Listening to Keyboard...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gbcDMCBsDoA/SQbI78HirsI/AAAAAAAAABE/9H9juu77goI/s72-c/stagewidth.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-2734894897337864629</id><published>2008-10-28T15:20:00.005+08:00</published><updated>2008-10-28T16:57:48.417+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>My Game Making History</title><content type='html'>&lt;p&gt;You read it right. I am interested in game programming. It started with Klik &amp;amp; Play. I actually bought the whole diskette stack together with the manual back in 199+. Back then, it was the only thing that can really make games without much programming. I actually learn simple logic scripting with that thing. I was back in university (UPM-anyone?) then and everything was done with my laptop. It was during that time that I discovered the pain joy of making a game. &lt;strike&gt;Not only you have to crack your brain thinking what to do but...&lt;/strike&gt; I was all alone back then with my Pentium 133Mhz (yes it was the state of ark) running 3D Studio 4 (nope not 3D Studio Max 4.0 but 3D Studio 4 for DOS, way before 3D Studio Max 1 &lt;strike&gt;or was it Lightwave 4.0 hmmm&lt;/strike&gt; ) I rendered myself a few images of what looked like a ball with an inverted ball for two eyes of a weird looking character, animate them a bit and import them image by image into Klik &amp;amp; Play. Anyone who actually did this would felt the hardship I went through and cried on this very moment. You would then said something like .... 'Actually there is another way'&lt;/p&gt;&lt;p&gt;&lt;br /&gt;I got into creating a clone of Snow Bros, something I called Fire Bros. The gameplay is similar, jumping from platform to platform and shotting red flaming balls of fire at the enemies insted of snowballs in Snow Bros. It was fun and nice &lt;strike&gt;(in a way if you think burning cute animals is fun... )&lt;/strike&gt;. My sis got to play with it and dare I say it was additive. That fueled me further and it was shaping out to be a good game with boses at the end of the level (I used the gaint ant animation which came with Klik &amp;amp; Play). Then I did something &lt;strike&gt;stupid&lt;/strike&gt; back then with my laptop. I installed Windows 2000 ( Cursed Unofficial ALPHA Releasessss ) over my Windows 98. Seeing how Windows 2000 have the tendancy to switch to FAT 32 from the existing FAT 16 in Windows 98, it formatted my entire harddisk. I was thinking that it was an upgrade and my stuff would have stayed intact so no backups were made. (There were no such things as thumbdrive, only floppy disk and CD writer cost a bomb on a laptop). To my most dismay, I lost all my stuffs including a half done shoot them-up. I cried overnight at my university dorm. Nah... I didn't. I just went blank and hope that I might be able to recover the info. After trying for about a month, I lost all hope together with Fire Bros. (Internet was not the norm back then so none of my work was uploaded anywhere and I use rocketmail - later bought over by yahoo to be yahoo mail) What a sad ending. The tools I used were &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Klik &amp;amp; Play&lt;/li&gt;&lt;li&gt;3D Studio 4.0 (DOS)&lt;/li&gt;&lt;li&gt;Paint Shop Pro&lt;/li&gt;&lt;li&gt;~a very old sound editing software which I have forgotten&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;These 3 tools were good... very good for what I did back then. Very good friends of mine they were... good friends they were (ok enough gibberishing). Klik &amp;amp; Play is still available from &lt;a href="http://www.clickteam.com/"&gt;http://www.clickteam.com/&lt;/a&gt;.&lt;br /&gt;My second big attempt weren't that glorious. It was for a course in Multimedia Design. I took screenshots from the animation Anastasia and created a point and click kinda game. And what did I use? &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Multimedia Fusion &lt;/li&gt;&lt;li&gt;Paint Shop Pro &lt;/li&gt;&lt;li&gt;Cakewalk (midi music) &lt;/li&gt;&lt;li&gt;Media Studio Pro (Ulead) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;Klik &amp;amp; Play was off the board as Multimedia Fusion kicked in. You can still find the later versions of Multimedia Fusion at &lt;a href="http://www.clickteam.com/"&gt;http://www.clickteam.com/&lt;/a&gt;. Anyway I got a &lt;strike&gt;freakingly bad&lt;/strike&gt; not so good grades due to some errr volume problem. (I still can't believe they rate based on the number of diskettes and CDs handed in)&lt;br /&gt;Then came the big&lt;strong&gt; final year project&lt;/strong&gt;! I took the challenge of creating a game. It was something I never did before (hahaha yeah right..) and I do not know what came into my brain when I took up that project. Oh wait.. I do. It was that Final Fantasy 7 game that was released on PC on that year. 3D animated character on 2D background! That was awesome back then! I played and played and played (finished and restarted again and again) &lt;strike&gt;until my laptop motherboard melted and burn down the entire dorm along with our papers&lt;/strike&gt;. I went on a wild research and bought a whole lot of books on OpenGL and Direct3D. Finally it was done in Direct3D. It was DirectX 5 back then and the only major game worth mentioning was Diablo, Warcraft, Red Alert, Quake, Doom.. (Halflife does not exist yet OMG!!! ) Halfway through my project, DirectX 6 was released but I didn't upgrade. I sitll did my stuffs in DirectX 5 with C++. The tools used were &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Visual C++ &lt;/li&gt;&lt;li&gt;DirectX Library &lt;/li&gt;&lt;li&gt;Lightwave3D (Switch from 3D Studio) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;I wasn't into sound so the project was without sound until the very last part where I passed the stuffs to my partner to add in the sound department. I got an A. It was one of it's kind. It was called &lt;strong&gt;The Sanctuary&lt;/strong&gt;. It was just a POC (proof of concept) demo game where a 3D character actually walked around a 2D rendered room similar to Final Fantasy 7 and only consisted of 4 areas to walk around. After graduation, I got students emailing me about my project. I passed on the codes and became a regular at &lt;a href="http://www.putera.com/"&gt;http://www.putera.com/&lt;/a&gt; for Q&amp;amp;A for game programming until they revamp the site. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-2734894897337864629?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/2734894897337864629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=2734894897337864629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2734894897337864629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/2734894897337864629'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/my-game-making-history.html' title='My Game Making History'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-3030934229553889492</id><published>2008-10-28T13:24:00.003+08:00</published><updated>2008-10-28T15:52:13.960+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS3 01 - Hello World'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash Scripting'/><title type='text'>AS3 01 - Hello World</title><content type='html'>Ok.. here goes.. for those who can script and understands what eventListeners are... skip this article &lt;strong&gt;NOW!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For those who can draw on Flash CS4 or CS3 but with a little.. subtle... knowledge of know how on ActionScript 3... read on. &lt;strike&gt;and cry because you are not gonna end up any better!&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;AS2 gave way to AS3 as the scripting language for Flash. Release concurrently with CS3 (but was actually released announced in 2006 and released with Flex 2), this joker pack speed boost and a &lt;strike&gt;nightmare&lt;/strike&gt; change of structure. They did good... good they did. The original AS was back in 1996 so after 20 years, they came up with version 3. I wouldn't say the same with certain 3D studio software which spawns almost 10 versions... I started with 3d studio for DOS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now I would assume that most that read this article have at least a basic understanding of simple scripting language like errr... loop? if else... stuff like that? What was it you say? No? Great.... because I am about to go through this very quickly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's start with 'Hello World'.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here are the crappy steps...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Launch your Flash CS4/3 ... whichever you prefer. (Tips... CS4 crawls on my PC :(... but I still need it thanks to the bones feature... &lt;strike&gt;which reminds me of Animatoion Master, Anime Studio... why am I saying these things here...&lt;/strike&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262079727256888354" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 300px; CURSOR: hand; HEIGHT: 144px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SQapodruZCI/AAAAAAAAAAM/l408wpOItHI/s320/CS4.jpg" border="0" /&gt;&lt;br /&gt;2. Create a new Flash Action Script 3 file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5262080326896849122" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 209px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_gbcDMCBsDoA/SQaqLXhCEOI/AAAAAAAAAAc/-6v0b_URFJY/s320/CreateNew.jpg" border="0" /&gt;&lt;br /&gt;3. You will be faced with a blank screen. &lt;strike&gt;Unlike other blank screen, if you look at it carefully you can faintly see Mona Lisa....&lt;/strike&gt; There is a 'Layer1' in your timeline created by default. Move your mouse over to the first cell/node/'that thing' and right click to bring up a floating menu. Select 'Action' &lt;strike&gt;to enable importing your action figures&lt;/strike&gt; and you will bring up the ActionScript editor.&lt;/p&gt;&lt;p&gt;4. Type in "trace('Hello World');"&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5262084617582707554" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 222px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SQauFHkQg2I/AAAAAAAAAA0/7cjlBpd3rgQ/s400/hello.jpg" border="0" /&gt;&lt;br /&gt;&lt;p&gt;5. Now hold down 'Ctrl' and 'Enter' together to test the movie.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;6. That's it! Your first action script in action... &lt;strike&gt;this is a waste of time... dammit why do I even bother writing this article...&lt;/strike&gt;. Wha? You mean that's it? If you don't know where to look for the 'Hello World', just close your AS editor and test the movie again. The 'Hello World' is in the OUTPUT tap.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5262084498955203410" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 64px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_gbcDMCBsDoA/SQat-NpQc1I/AAAAAAAAAAs/5T3H26R4ke0/s320/hello2.jpg" border="0" /&gt;&lt;br /&gt;Now for those who do not understand what 'trace()' does, just go back to the AS editor, highlight the word 'trace' and hit 'F1'. The help file should explain what it does.&lt;br /&gt;&lt;br /&gt;So in this article you know how to bring up the AS Editor, type in a simple AS, test the script and view it's output in the OUTPUT tab. Now that was very informative...&lt;br /&gt;&lt;br /&gt;.... not really.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-3030934229553889492?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/3030934229553889492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=3030934229553889492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3030934229553889492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/3030934229553889492'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/very-basic-of-as3-very-very-very-hello.html' title='AS3 01 - Hello World'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_gbcDMCBsDoA/SQapodruZCI/AAAAAAAAAAM/l408wpOItHI/s72-c/CS4.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-5535199572986474905</id><published>2008-10-28T13:12:00.001+08:00</published><updated>2008-10-28T16:58:14.849+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>The Dead Blog...</title><content type='html'>I notice that my last post was way back in July 4. That was like more than 3 months back. When I started this thing I thought it was easy to write and simple to share stuffs. Guess I was wrong. Anyway I am (supposedly) back on track...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-5535199572986474905?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/5535199572986474905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=5535199572986474905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/5535199572986474905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/5535199572986474905'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/10/dead-blog.html' title='The Dead Blog...'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5505441183172745047.post-7492435421136530240</id><published>2008-07-04T17:28:00.001+08:00</published><updated>2008-10-28T16:58:28.325+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stuffs'/><title type='text'>Why Flash?</title><content type='html'>I am gonna start up this blog by talking about Flash... no.. not the flashy type but Adobe Flash. Flash has been around since it's introduction in 1996. It was under Macromedia back then (Macromedia Flash) and  gained much momentum as a standard for the web animation and media delivery. Then in December 3rd 2005, Adobe Systems acquired Macromedia. T thought that it was the end for Flash but then I was wrong... and I was wayyy wrong. Adobe released Flash Player 9 in 2006, along with a preview of ActionScript 3.0. It was not until 2007 that Adobe Flash CS3 came out with full support for AC3. Why all the fuzz about AC3? Well, it's like this...&lt;br /&gt;&lt;br /&gt;Long time ago I played with Flash and AC (Action Script) 1 and 2. It was good and things were going pretty well. However, the speed of AC 1 and 2 was a bit on the disapointing side but that didn't stop millions of programmers from creating games, sites and applications with Flash. We just have to make do with all the things and restrictions we have that time. When AC3 was released, it changes everything. It's fast... and way way faster that it's predecessor. And then things just got better and better!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5505441183172745047-7492435421136530240?l=winterglass.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://winterglass.blogspot.com/feeds/7492435421136530240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5505441183172745047&amp;postID=7492435421136530240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7492435421136530240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5505441183172745047/posts/default/7492435421136530240'/><link rel='alternate' type='text/html' href='http://winterglass.blogspot.com/2008/07/why-flash.html' title='Why Flash?'/><author><name>WinterGlass</name><uri>http://www.blogger.com/profile/01623418046580680377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
