<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>zombiegx</title> <atom:link href="http://zombiegx.com/feed/" rel="self" type="application/rss+xml" /><link>http://zombiegx.com</link> <description>just keep coding</description> <lastBuildDate>Tue, 17 Nov 2009 02:23:08 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.8.6</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Konami Code for Flex 3</title><link>http://zombiegx.com/2009/11/16/konami-code-for-flex-3/</link> <comments>http://zombiegx.com/2009/11/16/konami-code-for-flex-3/#comments</comments> <pubDate>Tue, 17 Nov 2009 02:11:46 +0000</pubDate> <dc:creator>zombiegx</dc:creator> <category><![CDATA[Coding]]></category> <category><![CDATA[ActionScript 3]]></category> <category><![CDATA[Adobe Flex]]></category> <category><![CDATA[Konami Code]]></category><guid
isPermaLink="false">http://zombiegx.com/?p=35</guid> <description><![CDATA[I never did add an easter egg to any of my applications, but recently I stumbled upon konamicodesites.com, a site that lists other sites that use the konami code.
I&#8217;ve been working mostly with flex applications so I created a simple component to add 30 life to my apps, this component dispatches an event when the [...]]]></description> <content:encoded><![CDATA[<p>I never did add an <a
href="http://en.wikipedia.org/wiki/Easter_egg_%28media%29" target="_blank">easter egg</a> to any of my applications, but recently I stumbled upon <a
href="http://konamicodesites.com/" target="_blank">konamicodesites.com</a>, a site that lists other sites that use the <a
href="http://en.wikipedia.org/wiki/Konami_Code" target="_blank">konami code</a>.</p><p>I&#8217;ve been working mostly with flex applications so I created a simple component to add 30 life to my apps, this component dispatches an event when the user inputs the Konami Code on their keyboard.<br
/> <span
id="more-35"></span><br
/> To use the component just add it anywhere in your application.</p><div
class="wp_codebox_msgheader"><span
class="right"><sup><a
href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span
style="color: #99cc00">?</span></a></sup></span><span
class="left"><a
href="javascript:;" onclick="javascript:showCodeTxt('p35code3'); return false;">View Code</a> MXML</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table
width="100%" ><tr
id="p353"><td
class="code" id="p35code3"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;konamicode:KonamiCodeCatch</span> success=<span style="color: #ff0000;">&quot;Alert.show('+30 lives!!!')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span></pre></td></tr></table></div><p>here is the code of the component:</p><div
class="wp_codebox_msgheader"><span
class="right"><sup><a
href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span
style="color: #99cc00">?</span></a></sup></span><span
class="left"><a
href="javascript:;" onclick="javascript:showCodeTxt('p35code4'); return false;">View Code</a> ACTIONSCRIPT</span><div
class="codebox_clear"></div></div><div
class="wp_codebox"><table
width="100%" ><tr
id="p354"><td
class="code" id="p35code4"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:UIComponent xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> creationComplete=<span style="color: #ff0000;">&quot;init()&quot;</span><span style="color: #66cc66;">&gt;</span>
	<span style="color: #66cc66;">&lt;</span>mx:Metadata<span style="color: #66cc66;">&gt;</span>
		<span style="color: #66cc66;">&#91;</span>Event<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;success&quot;</span>, <span style="color: #0066CC;">type</span>=<span style="color: #ff0000;">&quot;flash.events.Event&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&lt;/</span>mx:Metadata<span style="color: #66cc66;">&gt;</span>
	<span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
		<span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// up-up-down-down-left-right-left-right-B-A</span>
			<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const KONAMI_CODE:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;UUDDLRLRBA&quot;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// signature</span>
			<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> signatureKeySequence:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
&nbsp;
			<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
				systemManager.<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#40;</span>event:KeyboardEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> keyCode:<span style="color: #0066CC;">int</span> = event.<span style="color: #006600;">keyCode</span>;
&nbsp;
			    <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>keyCode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			        <span style="color: #b1b100;">case</span> Keyboard.<span style="color: #0066CC;">UP</span>:
			            signatureKeySequence += <span style="color: #ff0000;">&quot;U&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
&nbsp;
			        <span style="color: #b1b100;">case</span> Keyboard.<span style="color: #0066CC;">DOWN</span>:
			            signatureKeySequence += <span style="color: #ff0000;">&quot;D&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
&nbsp;
			        <span style="color: #b1b100;">case</span> Keyboard.<span style="color: #0066CC;">LEFT</span>:
			            signatureKeySequence += <span style="color: #ff0000;">&quot;L&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
&nbsp;
			        <span style="color: #b1b100;">case</span> Keyboard.<span style="color: #0066CC;">RIGHT</span>:
			            signatureKeySequence += <span style="color: #ff0000;">&quot;R&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
&nbsp;
			        <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">66</span>: <span style="color: #808080; font-style: italic;">//Keyboard.B only for AIR :/</span>
			            signatureKeySequence += <span style="color: #ff0000;">&quot;B&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
&nbsp;
			        <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">65</span>: <span style="color: #808080; font-style: italic;">//Keyboard.A only for AIR too :(</span>
			            signatureKeySequence += <span style="color: #ff0000;">&quot;A&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
&nbsp;
			        <span style="color: #000000; font-weight: bold;">default</span>:
			            signatureKeySequence = <span style="color: #ff0000;">&quot;&quot;</span>;
			            <span style="color: #b1b100;">break</span>;
			    <span style="color: #66cc66;">&#125;</span>
&nbsp;
			    <span style="color: #808080; font-style: italic;">// crop sequence</span>
			    signatureKeySequence = signatureKeySequence.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span>0, KONAMI_CODE.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			    <span style="color: #808080; font-style: italic;">// check for konami code</span>
			    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>signatureKeySequence == KONAMI_CODE<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			        dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;success&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			        signatureKeySequence = <span style="color: #ff0000;">&quot;&quot;</span>;
			    <span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
	<span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
&nbsp;
<span style="color: #66cc66;">&lt;/</span>mx:UIComponent<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div><p>thanks to everyone who posted on <a
href="http://stackoverflow.com/questions/1546356/konami-code-in-flex">stack overflow</a></p> <img
src="http://zombiegx.com/?ak_action=api_record_view&id=35&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://zombiegx.com/2009/11/16/konami-code-for-flex-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hello world!</title><link>http://zombiegx.com/2009/11/12/hello-world/</link> <comments>http://zombiegx.com/2009/11/12/hello-world/#comments</comments> <pubDate>Thu, 12 Nov 2009 19:50:00 +0000</pubDate> <dc:creator>zombiegx</dc:creator> <category><![CDATA[Other]]></category><guid
isPermaLink="false">http://zombiegx.com/?p=1</guid> <description><![CDATA[This is my first post, so hello world!
The idea behind this blog is to create a knowledge base for all my learning experiences as a developer and a software engineer.
Why? Because plenty of times I&#8217;ve searched for information on a particular subject and found nothing, forcing me to implement things by myself, so I hope [...]]]></description> <content:encoded><![CDATA[<p>This is my first post, so hello world!</p><p>The idea behind this blog is to create a knowledge base for all my learning experiences as a developer and a software engineer.</p><p>Why? Because plenty of times I&#8217;ve searched for information on a particular subject and found nothing, forcing me to implement things by myself, so I hope some of the things I do get out there for some poor struggling developer.</p> <img
src="http://zombiegx.com/?ak_action=api_record_view&id=1&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://zombiegx.com/2009/11/12/hello-world/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk
Database Caching 0/15 queries in 0.002 seconds using memcached

Served from: host127.hostmonster.com @ 2010-03-11 00:51:26 -->