<?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>Designoid Games</title>
	<atom:link href="http://designoidgames.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://designoidgames.com</link>
	<description>Web application and game development</description>
	<lastBuildDate>Fri, 18 May 2012 17:17:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>10 shortcuts for Flash Builder / Eclipse that will save your life</title>
		<link>http://designoidgames.com/2012/05/10-shortcuts-for-flash-builder-eclipse-that-will-save-your-life/</link>
		<comments>http://designoidgames.com/2012/05/10-shortcuts-for-flash-builder-eclipse-that-will-save-your-life/#comments</comments>
		<pubDate>Fri, 18 May 2012 17:02:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=90</guid>
		<description><![CDATA[These are some Flash Builder, or Flex Builder for older versions (Eclipse) shortcuts I use daily and feel like they increase my productivity by a ton. I also like walking fast and am annoyed by slow walking people. Don&#8217;t be a slow walker when programming! &#160; 1. Ctrl-Shift-R &#8211; Open any file in the project [...]]]></description>
			<content:encoded><![CDATA[<p>These are some Flash Builder, or Flex Builder for older versions (Eclipse) shortcuts I use daily and feel like they increase my productivity by a ton. I also like walking fast and am annoyed by slow walking people. Don&#8217;t be a slow walker when programming!</p>
<p>&nbsp;</p>
<div class="wp-caption alignleft" style="width: 230px"><img title="Programming." src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Alphanumeric_keyboard.jpg/220px-Alphanumeric_keyboard.jpg" alt="Programming." width="220" height="276" /><p class="wp-caption-text">Programming without shortcuts</p></div>
<p><strong>1. Ctrl-Shift-R</strong> &#8211; Open any file in the project (really quickly!)</p>
<p>This is the most useful key shortcut for me, it&#8217;s a quick search for any files in your open projects and pretty much the only way I open files in my projects. Want to find a .fla file which was called something like UIButtons&#8230;, just type in *ui*fla. Or you want to open a source code file which was a State but you don&#8217;t remember exactly what, maybe StateMainMenu, type in *state*main*.as</p>
<p><strong>Bonus! Ctrl-Shift-T</strong> &#8211; Open type, slightly less useful but searches only for classes. Includes built in libraries and such.</p>
<p><strong>2. Ctrl-O</strong> &#8211; Jump to method/property (inside a source file). Official name is Quick Outline.</p>
<p>Instead of scrolling with your mouse wheel and looking for the right method, just press Ctrl-O and type the first letter or two of the method you&#8217;re looking for.</p>
<p><strong>3. Ctrl-Shift-G</strong> &#8211; Find all references of this method/property. Highlight a methods name and press Ctrl-Shift-G.</p>
<p>Very useful for finding dependencies when <strong>refactoring</strong> and getting a good general view of how a class fits in with it&#8217;s surroundings. See who calls the constructor of your class or figure out easily why is the init() method being called twice.</p>
<p>Bonus! <strong>Ctrl-G</strong> will find all overrides of a method.</p>
<p><strong>4. F3</strong> OR <strong>Ctrl-Click</strong> &#8211; Open Declaration. Click or move your text input cursor to the top of a method call and press F3. Jumps you to the method declaration.</p>
<p>You have a line that reads</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1">gameObject<span class="sy0">.</span>update<span class="br0">&#40;</span>deltaTime<span class="br0">&#41;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">gameObject.update(deltaTime)</pre></div></div>

<p>How do you find out what this update method does without first finding what class the gameObject is etc.? Either hold Ctrl and click on the <span style="text-decoration: underline;">update</span> or press F3.</p>
<p><strong>5. Ctrl-Tab</strong> &#8211; Switch to the next source file. Maybe obvious but it sure is handy.</p>
<p><strong>6. Ctrl-D</strong> &#8211; Delete line. Just removes the current line you&#8217;re on. I use this a lot to remove excess line breaks or a satisfying way to destroy a block of code you don&#8217;t need any more.</p>
<p><strong>7. Ctrl-Alt-Down/Up</strong> &#8211; Clone. Select some text, for example a MouseOver listener function. Press Ctrl-Alt-Down/Up to clone it above/below the method. In Flash you often write repetitive code like Mouse listener handlers and this way you can easily clone almost similar parts and just change the event names in the cloned block.</p>
<p><strong>8. Ctrl-Alt-R</strong> &#8211; Smart rename. Sometimes you have to rename your classes or methods and the built-in Eclipse renaming system is much more efficient than doing it by hand.</p>
<p><strong>9. Alt-Up/Down</strong> &#8211; Move selected lines one line up/down. This might be one of my personal quirks again but I like moving blocks of code around with this combo instead of cut-pasting for example. Give it a try!</p>
<p>That&#8217;s actually 11 already.</p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2012/05/10-shortcuts-for-flash-builder-eclipse-that-will-save-your-life/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2012/05/10-shortcuts-for-flash-builder-eclipse-that-will-save-your-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Touchscreen D-pad with AIR for Android (part 1 of 2)</title>
		<link>http://designoidgames.com/2011/10/touchscreen-d-pad-with-air-for-android-part-1-of-2/</link>
		<comments>http://designoidgames.com/2011/10/touchscreen-d-pad-with-air-for-android-part-1-of-2/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 08:03:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=76</guid>
		<description><![CDATA[A lot of games use the directional pad or arrow keys for movement. When you move to mobile devices with only a touchscreen, you lose one of the staples of your game controls. I&#8217;ll show a simple way of getting your D-pad back and hopefully allowing you to make the transition to mobile easier. We [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of games use the directional pad or arrow keys for movement. When you move to mobile devices with only a touchscreen, you lose one of the staples of your game controls. I&#8217;ll show a simple way of getting your D-pad back and hopefully allowing you to make the transition to mobile easier.</p>
<p><a href="http://designoidgames.com/wp/wp-content/uploads/2011/10/dpads.jpeg"><img src="http://designoidgames.com/wp/wp-content/uploads/2011/10/dpads.jpeg" alt="" title="dpads" width="222" height="117" class="alignleft size-full wp-image-77" /></a></p>
<p>We need to listen to the TOUCH_BEGIN, TOUCH_MOVE and TOUCH_END events. <em>If you&#8217;re familiar with mouse events already, you can think of BEGIN as MOUSE_DOWN and END as MOUSE_UP.</em> The biggest difference between a mouse and touch screen is that there can be multiple touches so you need to keep track of which is which. If you got three fingers on the screen and only follow the events, it&#8217;s gonna be a mess.</p>
<p>How to keep track of the touches then? Each touch has touchPointID associated with it so whenever a touch event is fired, you can dig it up and compare it with all your known touch IDs. For now we will use the first touch to occur and assign that for our D-pad.</p>
<p>Before anything else, let&#8217;s set the input mode for the Multitouch class to Touch_Point. This means Flash will only track the basic touch events like when the touch begins, when it moves and when it ends.</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
</pre></td><td class="de1"><pre class="de1"><span class="kw1">private</span> <span class="kw3">function</span> <span class="kw7">init</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; Multitouch<span class="sy0">.</span>inputMode = MultitouchInputMode<span class="sy0">.</span>TOUCH_POINT<span class="sy0">;</span>
<span class="br0">&#125;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">private function init():void{
  Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
}</pre></div></div>

<p>Then add some basic listeners for Touch events.</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="de1"><pre class="de1"><span class="co1">// ... extends Sprite</span>
&nbsp;
<span class="kw1">private</span> <span class="kw2">var</span> dpadTouchID<span class="sy0">:</span><span class="kw5">int</span>=<span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>
&nbsp;
<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">init</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; Multitouch<span class="sy0">.</span>inputMode = MultitouchInputMode<span class="sy0">.</span>TOUCH_POINT<span class="sy0">;</span>
&nbsp;
&nbsp; <span class="kw7">addEventListener</span><span class="br0">&#40;</span>TouchEvent<span class="sy0">.</span>TOUCH_BEGIN<span class="sy0">,</span> touchBegin<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; <span class="kw7">addEventListener</span><span class="br0">&#40;</span>TouchEvent<span class="sy0">.</span>TOUCH_END<span class="sy0">,</span> touchEnd<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">private</span> <span class="kw3">function</span> touchBegin<span class="br0">&#40;</span>e<span class="sy0">:</span>TouchEvent<span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; dpadTouchID = e<span class="sy0">.</span>touchPointID<span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">private</span> <span class="kw3">function</span> touchEnd<span class="br0">&#40;</span>e<span class="sy0">:</span>TouchEvent<span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; dpadTouchID = <span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">// ... extends Sprite

private var dpadTouchID:int=-1;

public function init():void{
  Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

  addEventListener(TouchEvent.TOUCH_BEGIN, touchBegin);
  addEventListener(TouchEvent.TOUCH_END, touchEnd);
}

private function touchBegin(e:TouchEvent):void{
  dpadTouchID = e.touchPointID;
}

private function touchEnd(e:TouchEvent):void{
  dpadTouchID = -1;
}</pre></div></div>

<p>Something I&#8217;ve noticed is that touchPointID&#8217;s always start from 0 and go up. We&#8217;ll use -1 to tell when there is no touch assigned to the D-Pad.</p>
<p>We shouldn&#8217;t assume that there&#8217;s only gonna be one touch because there probably will be atleast 2. We&#8217;ll add some checks to make sure we&#8217;re only looking at the correct touch and add a event listener for TOUCH_MOVE so we can track the movement of the finger.</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar" style="right: 15px;" ><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"style=" height: 504px;"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="de1"><pre class="de1"><span class="co1">// ... extends Sprite</span>
&nbsp;
<span class="kw1">private</span> <span class="kw2">var</span> dpadTouchID<span class="sy0">:</span><span class="kw5">int</span>=<span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>
&nbsp;
<span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">init</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; <span class="kw7">addEventListener</span><span class="br0">&#40;</span>TouchEvent<span class="sy0">.</span>TOUCH_BEGIN<span class="sy0">,</span> touchBegin<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; <span class="kw7">addEventListener</span><span class="br0">&#40;</span>TouchEvent<span class="sy0">.</span>TOUCH_END<span class="sy0">,</span> touchEnd<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; <span class="kw7">addEventListener</span><span class="br0">&#40;</span>TouchEvent<span class="sy0">.</span>TOUCH_MOVE<span class="sy0">,</span> touchMove<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">private</span> <span class="kw3">function</span> touchBegin<span class="br0">&#40;</span>e<span class="sy0">:</span>TouchEvent<span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>dpadTouchID == <span class="sy0">-</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; dpadTouchID = e<span class="sy0">.</span>touchPointID<span class="sy0">;</span>
&nbsp; <span class="br0">&#125;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">private</span> <span class="kw3">function</span> touchEnd<span class="br0">&#40;</span>e<span class="sy0">:</span>TouchEvent<span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>e<span class="sy0">.</span>touchPointID == dpadTouchID<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; dpadTouchID = <span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>
&nbsp; <span class="br0">&#125;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">private</span> <span class="kw3">function</span> touchMove<span class="br0">&#40;</span>e<span class="sy0">:</span>TouchEvent<span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
<span class="co1">//make sure a D-Pad touch is assigned at all, and then check if it matches</span>
&nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>dpadTouchID <span class="sy0">!</span>= <span class="sy0">-</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>e<span class="sy0">.</span>touchPointID == dpadTouchID<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; <span class="co1">// success! let's print out the x and y!</span>
&nbsp; &nbsp; &nbsp; <span class="kw7">trace</span><span class="br0">&#40;</span><span class="st0">'D-Pad is moving!'</span><span class="sy0">,</span> e<span class="sy0">.</span><span class="kw7">stageX</span><span class="sy0">,</span> e<span class="sy0">.</span><span class="kw7">stageY</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; <span class="br0">&#125;</span>
&nbsp;
<span class="br0">&#125;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">// ... extends Sprite

private var dpadTouchID:int=-1;

public function init():void{
  addEventListener(TouchEvent.TOUCH_BEGIN, touchBegin);
  addEventListener(TouchEvent.TOUCH_END, touchEnd);
  addEventListener(TouchEvent.TOUCH_MOVE, touchMove);
}

private function touchBegin(e:TouchEvent):void{
  if(dpadTouchID == -1){
    dpadTouchID = e.touchPointID;
  }
}

private function touchEnd(e:TouchEvent):void{
  if(e.touchPointID == dpadTouchID){
    dpadTouchID = -1;
  }
}

private function touchMove(e:TouchEvent):void{
//make sure a D-Pad touch is assigned at all, and then check if it matches
  if(dpadTouchID != -1){
    if(e.touchPointID == dpadTouchID){
      // success! let's print out the x and y!
      trace('D-Pad is moving!', e.stageX, e.stageY);
    }
  }

}</pre></div></div>

<div id="attachment_78" class="wp-caption alignleft" style="width: 216px"><a href="http://designoidgames.com/wp/wp-content/uploads/2011/10/dpadFlashArrows.jpg"><img src="http://designoidgames.com/wp/wp-content/uploads/2011/10/dpadFlashArrows.jpg" alt="" title="dpadFlashArrows" width="206" height="206" class="size-full wp-image-78" /></a><p class="wp-caption-text">The red area shows where the touch area is for the finger, right now its overlapping right and up arrows.</p></div>
<p>Ok, now we&#8217;re tracking the D-pad touch around. It&#8217;s still pretty much acting like a mouse though. We want to use the touch tracking for a D-pad so we&#8217;ll need to figure out based on those X and Y coordinates if the finger is on top of any of the D-Pad buttons. Just for examples sake, we&#8217;ll draw a simple graphic to represent the four directional buttons. The buttons are 100&#215;100 pixels in size. The touch area we&#8217;ll be using is going to be 60 pixels so it&#8217;s small enough to still be precise but big enough so that it can cover two buttons at a time. This way you get 8 directions easily.</p>
<p>Right now we&#8217;re using the 60&#215;60 square for the finger area but TouchEvent&#8217;s have some interesting properties you might want to look into later. For example; pressure, sizeX and sizeY. Those should come in handy when creating more sophisticated controls.</p>
<p>Next create some simple graphics for the buttons. We&#8217;ll name them upArrow, downArrow, leftArrow and rightArrow. They should be a descendant of the DisplayObject class for this.</p>
<p>You want to re-check which buttons your finger is touching whenever it has moved and when it&#8217;s first pressed into the screen. So we should modify touchMove(e) and touchBegin(e) to check that.</p>
<p>Stay tuned for part 2! </p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2011/10/touchscreen-d-pad-with-air-for-android-part-1-of-2/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2011/10/touchscreen-d-pad-with-air-for-android-part-1-of-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Master Of MOT</title>
		<link>http://designoidgames.com/2011/09/master-of-mot/</link>
		<comments>http://designoidgames.com/2011/09/master-of-mot/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 12:15:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=49</guid>
		<description><![CDATA[We developed a new physics based game with Redland Oy for Kielikone to promote their new mobile dictionaries. In the game you throw the MOT character from your phone and try to hit the right object. The object you&#8217;re supposed to hit is shown to you in one of the languages found in the dictionary. [...]]]></description>
			<content:encoded><![CDATA[<p>We developed a new physics based game with Redland Oy for Kielikone to promote their new mobile dictionaries. In the game you throw the MOT character from your phone and try to hit the right object. The object you&#8217;re supposed to hit is shown to you in one of the languages found in the dictionary.</p>
<p><a href="http://mobiilisanakirja.fi/">PLAY IT HERE!</a></p>
<p><a href="http://designoidgames.com/wp/wp-content/uploads/2010/05/mastermot.jpg"><img src="http://designoidgames.com/wp/wp-content/uploads/2010/05/mastermot.jpg" alt="" title="mastermot" width="493" height="500" class="alignnone size-full wp-image-47" /></a></p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2011/09/master-of-mot/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2011/09/master-of-mot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ragdoll Hockey Goalie</title>
		<link>http://designoidgames.com/2011/05/ragdoll-hockey-goalie/</link>
		<comments>http://designoidgames.com/2011/05/ragdoll-hockey-goalie/#comments</comments>
		<pubDate>Tue, 17 May 2011 14:33:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=44</guid>
		<description><![CDATA[I just released a new game called Ragdoll Hockey Goalie! It&#8217;s a remake of the football version but you play as an ice hockey goalie and can choose your team. Go Finland! It was immediately chosen as the game of the week(?) on pelikone.fi. Play it here!]]></description>
			<content:encoded><![CDATA[<p>I just released a new game called Ragdoll Hockey Goalie! It&#8217;s a remake of the football version but you play as an ice hockey goalie and can choose your team. Go Finland!</p>
<p>It was immediately chosen as the game of the week(?) on pelikone.fi.<br />
<a href="http://pelikone.fi/pelit/arcade-pelit/Ragdoll-Hockey-Goalie/8866">Play it here!<br />
</a><br />
<a href="http://designoidgames.com/wp/wp-content/uploads/2011/05/hockey-jump.jpg"><img src="http://designoidgames.com/wp/wp-content/uploads/2011/05/hockey-jump.jpg" alt="" title="hockey-jump" width="405" height="247" class="alignnone size-full wp-image-45" /></a></p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2011/05/ragdoll-hockey-goalie/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2011/05/ragdoll-hockey-goalie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check out some of our latest work</title>
		<link>http://designoidgames.com/2011/03/game-gallery-2/</link>
		<comments>http://designoidgames.com/2011/03/game-gallery-2/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 02:01:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=34</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<blockquote><div id="attachment_60" class="wp-caption alignleft" style="width: 129px"><a href="http://mobiilisanakirja.fi/"><img class="size-full wp-image-60" title="Master of Mot" src="http://designoidgames.com/wp/wp-content/uploads/2011/03/mot1.png" alt="Master of Mot" width="119" height="79" /></a><p class="wp-caption-text">Master of Mot</p></div>
<div id="attachment_73" class="wp-caption alignleft" style="width: 117px"><a href="http://petrasplanet.com"><img class="size-full wp-image-73" title="petranplanet" src="http://designoidgames.com/wp/wp-content/uploads/2011/09/petranplanet.png" alt="Petra's Planet" width="107" height="95" /></a><p class="wp-caption-text">Petra&#39;s Planet</p></div>
<p><div id="attachment_40" class="wp-caption alignleft" style="width: 150px"><a href="http://armorgames.com/play/5388/demolition-dude"><img class="size-full wp-image-40" title="demolition-dude" src="http://designoidgames.com/wp/wp-content/uploads/2011/03/demolition-dude.jpg" alt="Demolition Dude" width="140" height="78" /></a><p class="wp-caption-text">Demolition Dude ( &gt; 7 million plays)</p></div><br />
<br/>
</p></blockquote>
<blockquote><div id="attachment_37" class="wp-caption alignleft" style="width: 103px"><a href="http://www.kongregate.com/games/hatu/snailer"><img class="size-full wp-image-37" title="snailer10075" src="http://designoidgames.com/wp/wp-content/uploads/2011/03/snailer10075.jpg" alt="" width="93" height="74" /></a><p class="wp-caption-text">Snailer</p></div>
<div id="attachment_35" class="wp-caption alignleft" style="width: 103px"><a href="http://www.funny-games.biz/ragdoll-goalkeeper.html"><img class="size-full wp-image-35" title="ragdoll" src="http://designoidgames.com/wp/wp-content/uploads/2011/03/ragdoll.png" alt="" width="93" height="74" /></a><p class="wp-caption-text">Ragdoll Goalkeeper ( &gt; 6 million plays)</p></div>
<p><div id="attachment_36" class="wp-caption alignleft" style="width: 103px"><a href="https://market.android.com/details?id=air.com.designoidgames.FlaileryRPG"><img class="size-full wp-image-36" title="whiflash10075" src="http://designoidgames.com/wp/wp-content/uploads/2011/10/flaileryAndroid.jpg" alt="" width="120" height="80" /></a><p class="wp-caption-text">Flailery RPG (Android w/ AIR)</p></div><br />
<br/>
</p></blockquote>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2011/03/game-gallery-2/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2011/03/game-gallery-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some Flex components that might be useful, Indexed RadioButton Group, Flex MovieClip</title>
		<link>http://designoidgames.com/2011/03/some-flex-components-that-might-be-useful-indexed-radiobutton-group-flex-movieclip/</link>
		<comments>http://designoidgames.com/2011/03/some-flex-components-that-might-be-useful-indexed-radiobutton-group-flex-movieclip/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 18:54:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=79</guid>
		<description><![CDATA[In my last project I made some possibly useful Flex classes that I&#8217;ll briefly explain and share here. Maybe I should set up a GitHub with them soon or something. The first one is IndexedRadioButtonGroup which improves the spark(Flex4) RadioButtonGroup by adding methods that help you keep track and control the index of which radio [...]]]></description>
			<content:encoded><![CDATA[<p>In my last project I made some possibly useful Flex classes that I&#8217;ll briefly explain and share here. Maybe I should set up a GitHub with them soon or something.</p>
<p>The first one is IndexedRadioButtonGroup which improves the spark(Flex4) RadioButtonGroup by adding methods that help you keep track and control the index of which radio button is selected. The main use for this is using radio buttons for navigation.</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar" style="right: 15px;" ><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"style=" height: 504px;"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="de1"><pre class="de1"><span class="co1">// IndexedRadioButtonGroup.as</span>
<span class="kw4">package</span> com<span class="sy0">.</span>designoidgames<span class="sy0">.</span>ui
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw1">import</span> <span class="kw6">flash.events</span><span class="sy0">.</span><span class="kw5">Event</span><span class="sy0">;</span>
&nbsp; &nbsp; <span class="kw1">import</span> <span class="kw6">flash.utils</span><span class="sy0">.</span><span class="kw7">getTimer</span><span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; <span class="kw1">import</span> mx<span class="sy0">.</span>core<span class="sy0">.</span>IFlexDisplayObject<span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; <span class="kw1">import</span> spark<span class="sy0">.</span>components<span class="sy0">.</span>RadioButtonGroup<span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">class</span> IndexedRadioButtonGroup <span class="kw1">extends</span> RadioButtonGroup
&nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw3">function</span> IndexedRadioButtonGroup<span class="br0">&#40;</span>document<span class="sy0">:</span>IFlexDisplayObject=<span class="kw1">null</span><span class="br0">&#41;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">super</span><span class="br0">&#40;</span>document<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw3">function</span> getCurrentIndex<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw5">int</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> i<span class="sy0">:</span><span class="kw5">int</span>=<span class="nu0">0</span><span class="sy0">;</span>i
<span class="sy0">&lt;</span>this<span class="sy0">.</span>numRadioButtons<span class="sy0">;</span>i<span class="sy0">++</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>getRadioButtonAt<span class="br0">&#40;</span>i<span class="br0">&#41;</span> == <span class="kw1">this</span><span class="sy0">.</span>selection<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> i<span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw3">function</span> selectIndex<span class="br0">&#40;</span><span class="kw7">index</span><span class="sy0">:</span><span class="kw5">int</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selection = getRadioButtonAt<span class="br0">&#40;</span><span class="kw7">index</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw7">dispatchEvent</span><span class="br0">&#40;</span><span class="kw1">new</span> <span class="kw5">Event</span><span class="br0">&#40;</span><span class="kw5">Event</span><span class="sy0">.</span><span class="kw8">CHANGE</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw3">function</span> moveLeft<span class="br0">&#40;</span>ignoreEnabled<span class="sy0">:</span><span class="kw5">Boolean</span>=<span class="kw1">false</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw7">index</span><span class="sy0">:</span><span class="kw5">int</span> = getCurrentIndex<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw7">index</span> = <span class="kw5">Math</span><span class="sy0">.</span><span class="kw7">max</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="sy0">,</span> index<span class="sy0">-</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>getRadioButtonAt<span class="br0">&#40;</span><span class="kw7">index</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">enabled</span> <span class="sy0">||</span> ignoreEnabled<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectIndex<span class="br0">&#40;</span><span class="kw7">index</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw3">function</span> moveRight<span class="br0">&#40;</span>ignoreEnabled<span class="sy0">:</span><span class="kw5">Boolean</span>=<span class="kw1">false</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw7">index</span><span class="sy0">:</span><span class="kw5">int</span> = getCurrentIndex<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw7">index</span> = <span class="kw5">Math</span><span class="sy0">.</span><span class="kw7">min</span><span class="br0">&#40;</span>numRadioButtons<span class="sy0">-</span><span class="nu0">1</span><span class="sy0">,</span> <span class="kw7">index</span><span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>getRadioButtonAt<span class="br0">&#40;</span><span class="kw7">index</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">enabled</span> <span class="sy0">||</span> ignoreEnabled<span class="br0">&#41;</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectIndex<span class="br0">&#40;</span><span class="kw7">index</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">// IndexedRadioButtonGroup.as
package com.designoidgames.ui
{
	import flash.events.Event;
	import flash.utils.getTimer;

	import mx.core.IFlexDisplayObject;

	import spark.components.RadioButtonGroup;

	public class IndexedRadioButtonGroup extends RadioButtonGroup
	{

		public function IndexedRadioButtonGroup(document:IFlexDisplayObject=null)
		{
			super(document);
		}

		public function getCurrentIndex():int{
			for(var i:int=0;i
&lt;this.numRadioButtons;i++){
				if(getRadioButtonAt(i) == this.selection){
					return i;
				}
			}

			return -1;
		}

		public function selectIndex(index:int):void{
			selection = getRadioButtonAt(index);
			dispatchEvent(new Event(Event.CHANGE));
		}

		public function moveLeft(ignoreEnabled:Boolean=false):void{
			var index:int = getCurrentIndex();
			index = Math.max(0, index-1);
			if(getRadioButtonAt(index).enabled || ignoreEnabled){
				selectIndex(index);
			}
		}

		public function moveRight(ignoreEnabled:Boolean=false):void{
			var index:int = getCurrentIndex();
			index = Math.min(numRadioButtons-1, index+1);
			if(getRadioButtonAt(index).enabled || ignoreEnabled){
				selectIndex(index);
			}
		}

	}
}</pre></div></div>

<p>The next two classes are the MovieClipButton and a static skin class for it. This is useful when you want to use embedded MovieClips, like when you have a lot of material inside the Flash IDE and you export it as an .SWC file into your project. The MovieClipButton class is extremely simple, in fact it only adds one method to the spark Button called 'source' (other spark components like Image use the same).</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="de1"><pre class="de1"><span class="co1">// MovieClipButton.mxml</span>
<span class="sy0">&lt;?</span>xml <span class="kw7">version</span>=<span class="st0">&quot;1.0&quot;</span> encoding=<span class="st0">&quot;utf-8&quot;</span><span class="sy0">?&gt;</span>
<span class="sy0">&lt;</span>s<span class="sy0">:</span>Button xmlns<span class="sy0">:</span>fx=<span class="st0">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlns<span class="sy0">:</span>s=<span class="st0">&quot;library://ns.adobe.com/flex/spark&quot;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlns<span class="sy0">:</span>mx=<span class="st0">&quot;library://ns.adobe.com/flex/mx&quot;</span> <span class="kw7">useHandCursor</span>=<span class="st0">&quot;true&quot;</span> <span class="kw7">buttonMode</span>=<span class="st0">&quot;true&quot;</span><span class="sy0">&gt;</span>
&nbsp; &nbsp; <span class="sy0">&lt;</span>fx<span class="sy0">:</span>Declarations<span class="sy0">&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;!--</span> Place non<span class="sy0">-</span>visual <span class="kw7">elements</span> <span class="br0">&#40;</span>e<span class="sy0">.</span>g<span class="sy0">.,</span> services<span class="sy0">,</span> <span class="kw7">value</span> objects<span class="br0">&#41;</span> here <span class="sy0">--&gt;</span>
&nbsp; &nbsp; <span class="sy0">&lt;/</span>fx<span class="sy0">:</span>Declarations<span class="sy0">&gt;</span>
&nbsp;
&nbsp; &nbsp; <span class="sy0">&lt;</span>fx<span class="sy0">:</span>Script<span class="sy0">&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;!</span><span class="br0">&#91;</span>CDATA<span class="br0">&#91;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw2">var</span> <span class="kw7">source</span><span class="sy0">:</span><span class="kw5">Class</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#93;</span><span class="br0">&#93;</span><span class="sy0">&gt;</span>
&nbsp; &nbsp; <span class="sy0">&lt;/</span>fx<span class="sy0">:</span>Script<span class="sy0">&gt;</span>
&nbsp;
<span class="sy0">&lt;/</span>s<span class="sy0">:</span>Button<span class="sy0">&gt;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">// MovieClipButton.mxml
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
		  xmlns:s="library://ns.adobe.com/flex/spark"
		  xmlns:mx="library://ns.adobe.com/flex/mx" useHandCursor="true" buttonMode="true"&gt;
	&lt;fx:Declarations&gt;
		&lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
	&lt;/fx:Declarations&gt;

	&lt;fx:Script&gt;
		&lt;![CDATA[
			public var source:Class;
		]]&gt;
	&lt;/fx:Script&gt;

&lt;/s:Button&gt;</pre></div></div>

<p>Then you supply a skin class for the button, this is the simplest one. It only tries to set the current frame of the MovieClip to a frame with the same name as the current state. Also if the MovieClip has a text label like most buttons do, you can change the text through MXML. Just make sure it's called "label" inside the MovieClip.</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar" style="right: 15px;" ><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"style=" height: 504px;"><table class="actionscript3"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
</pre></td><td class="de1"><pre class="de1"><span class="co1">// StaticButtonSkin.mxml</span>
<span class="sy0">&lt;?</span>xml <span class="kw7">version</span>=<span class="st0">&quot;1.0&quot;</span> encoding=<span class="st0">&quot;utf-8&quot;</span><span class="sy0">?&gt;</span>
&nbsp;
<span class="sy0">&lt;!---</span> The <span class="kw1">default</span> wireframe skin <span class="kw4">class</span> <span class="kw1">for</span> the Spark Button component<span class="sy0">.</span>
&nbsp; &nbsp; &nbsp; &nbsp; Skin classes <span class="kw1">in</span> the wireframe <span class="kw4">package</span> are useful <span class="kw1">for</span> using <span class="kw1">as</span> a simple base <span class="kw1">for</span> a custom skin<span class="sy0">.</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;@see spark<span class="sy0">.</span>components<span class="sy0">.</span>Button
&nbsp;
&nbsp; &nbsp; &nbsp; @langversion <span class="nu0">3.0</span>
&nbsp; &nbsp; &nbsp; @playerversion Flash <span class="nu0">10</span>
&nbsp; &nbsp; &nbsp; @playerversion AIR <span class="nu0">1.5</span>
&nbsp; &nbsp; &nbsp; @productversion Flex <span class="nu0">4</span>
<span class="sy0">--&gt;</span>
<span class="sy0">&lt;</span>s<span class="sy0">:</span>SparkButtonSkin xmlns<span class="sy0">:</span>fx=<span class="st0">&quot;http://ns.adobe.com/mxml/2009&quot;</span> xmlns<span class="sy0">:</span>s=<span class="st0">&quot;library://ns.adobe.com/flex/spark&quot;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; creationComplete=<span class="st0">&quot;creationCompleteHandler(event)&quot;</span> <span class="kw7">alpha</span><span class="sy0">.</span>disabled=<span class="st0">&quot;0&quot;</span><span class="sy0">&gt;</span>
&nbsp; &nbsp; <span class="sy0">&lt;</span>fx<span class="sy0">:</span>Metadata<span class="sy0">&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#91;</span>HostComponent<span class="br0">&#40;</span><span class="st0">&quot;com.designoidgames.ui.MovieClipButton&quot;</span><span class="br0">&#41;</span><span class="br0">&#93;</span>
&nbsp; &nbsp; <span class="sy0">&lt;/</span>fx<span class="sy0">:</span>Metadata<span class="sy0">&gt;</span>
&nbsp;
&nbsp; &nbsp; <span class="sy0">&lt;</span>fx<span class="sy0">:</span>Script<span class="sy0">&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;!</span><span class="br0">&#91;</span>CDATA<span class="br0">&#91;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">import</span> mx<span class="sy0">.</span>events<span class="sy0">.</span>FlexEvent<span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">private</span> <span class="kw2">var</span> mc<span class="sy0">:</span><span class="kw5">MovieClip</span><span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; override <span class="kw1">protected</span> <span class="kw3">function</span> stateChanged<span class="br0">&#40;</span>oldState<span class="sy0">:</span><span class="kw5">String</span><span class="sy0">,</span> newState<span class="sy0">:</span><span class="kw5">String</span><span class="sy0">,</span> recursive<span class="sy0">:</span><span class="kw5">Boolean</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">super</span><span class="sy0">.</span>stateChanged<span class="br0">&#40;</span>oldState<span class="sy0">,</span>newState<span class="sy0">,</span>recursive<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>mc==<span class="kw1">null</span><span class="br0">&#41;</span> <span class="kw1">return</span><span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mc<span class="sy0">.</span><span class="kw7">gotoAndStop</span><span class="br0">&#40;</span>newState<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">protected</span> <span class="kw3">function</span> creationCompleteHandler<span class="br0">&#40;</span>event<span class="sy0">:</span>FlexEvent<span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mc = <span class="kw1">new</span> <span class="br0">&#40;</span>hostComponent <span class="kw1">as</span> MovieClipButton<span class="br0">&#41;</span><span class="sy0">.</span><span class="kw7">source</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mcHolder<span class="sy0">.</span><span class="kw7">addChild</span><span class="br0">&#40;</span>mc<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mc<span class="sy0">.</span><span class="kw7">gotoAndStop</span><span class="br0">&#40;</span>currentState<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>hostComponent<span class="sy0">.</span>label<span class="br0">&#41;</span> mc<span class="sy0">.</span>label<span class="sy0">.</span><span class="kw7">text</span> = hostComponent<span class="sy0">.</span>label<span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#93;</span><span class="br0">&#93;</span><span class="sy0">&gt;</span>
&nbsp; &nbsp; <span class="sy0">&lt;/</span>fx<span class="sy0">:</span>Script<span class="sy0">&gt;</span>
&nbsp;
&nbsp; &nbsp; <span class="sy0">&lt;</span>s<span class="sy0">:</span>states<span class="sy0">&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>s<span class="sy0">:</span>State <span class="kw7">name</span>=<span class="st0">&quot;up&quot;</span> <span class="sy0">/&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>s<span class="sy0">:</span>State <span class="kw7">name</span>=<span class="st0">&quot;over&quot;</span> <span class="sy0">/&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>s<span class="sy0">:</span>State <span class="kw7">name</span>=<span class="st0">&quot;down&quot;</span> <span class="sy0">/&gt;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;</span>s<span class="sy0">:</span>State <span class="kw7">name</span>=<span class="st0">&quot;disabled&quot;</span> <span class="sy0">/&gt;</span>
&nbsp; &nbsp; <span class="sy0">&lt;/</span>s<span class="sy0">:</span>states<span class="sy0">&gt;</span>
&nbsp;
&nbsp; &nbsp; <span class="sy0">&lt;</span>s<span class="sy0">:</span>SpriteVisualElement id=<span class="st0">&quot;mcHolder&quot;</span><span class="sy0">/&gt;</span>
&nbsp;
<span class="sy0">&lt;/</span>s<span class="sy0">:</span>SparkButtonSkin<span class="sy0">&gt;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">// StaticButtonSkin.mxml
&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;!--- The default wireframe skin class for the Spark Button component.
        Skin classes in the wireframe package are useful for using as a simple base for a custom skin.

       @see spark.components.Button

      @langversion 3.0
      @playerversion Flash 10
      @playerversion AIR 1.5
      @productversion Flex 4
--&gt;
&lt;s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
    				creationComplete="creationCompleteHandler(event)" alpha.disabled="0"&gt;
	&lt;fx:Metadata&gt;
		[HostComponent("com.designoidgames.ui.MovieClipButton")]
	&lt;/fx:Metadata&gt;

	&lt;fx:Script&gt;
		&lt;![CDATA[
			import mx.events.FlexEvent;

			private var mc:MovieClip;

			override protected function stateChanged(oldState:String, newState:String, recursive:Boolean):void{
				super.stateChanged(oldState,newState,recursive);

				if(mc==null) return;

				mc.gotoAndStop(newState);
			}

			protected function creationCompleteHandler(event:FlexEvent):void{
				mc = new (hostComponent as MovieClipButton).source();
				mcHolder.addChild(mc);

				mc.gotoAndStop(currentState);

				if(hostComponent.label) mc.label.text = hostComponent.label;
			}

		]]&gt;
	&lt;/fx:Script&gt;

    &lt;s:states&gt;
        &lt;s:State name="up" /&gt;
        &lt;s:State name="over" /&gt;
        &lt;s:State name="down" /&gt;
        &lt;s:State name="disabled" /&gt;
    &lt;/s:states&gt;

	&lt;s:SpriteVisualElement id="mcHolder"/&gt;

&lt;/s:SparkButtonSkin&gt;</pre></div></div>

<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2011/03/some-flex-components-that-might-be-useful-indexed-radiobutton-group-flex-movieclip/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2011/03/some-flex-components-that-might-be-useful-indexed-radiobutton-group-flex-movieclip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Penalty Cup Champion !!!</title>
		<link>http://designoidgames.com/2010/10/penalty-cup-champion/</link>
		<comments>http://designoidgames.com/2010/10/penalty-cup-champion/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 20:34:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=26</guid>
		<description><![CDATA[Been working hard on a new Facebook based football game. More info soon!]]></description>
			<content:encoded><![CDATA[<p><a href="http://designoidgames.com/wp/wp-content/uploads/2010/10/logo1.png"><img src="http://designoidgames.com/wp/wp-content/uploads/2010/10/logo1-300x120.png" alt="" title="logo1" width="300" height="120" class="alignnone size-medium wp-image-27" /></a><br />
Been working hard on a new Facebook based football game. More info soon!</p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2010/10/penalty-cup-champion/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2010/10/penalty-cup-champion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Demolition Dude released!</title>
		<link>http://designoidgames.com/2010/03/demolition-dude-released/</link>
		<comments>http://designoidgames.com/2010/03/demolition-dude-released/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 08:38:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://designoidgames.com/?p=8</guid>
		<description><![CDATA[Demolition Dude has been released, first exclusively on Armor Games. After a week, the viral version will be out without a sitelock. Play it now.]]></description>
			<content:encoded><![CDATA[<p><a href="http://designoidgames.com/wp/wp-content/uploads/2010/03/demoScreen640480.jpg"><img class="alignnone size-full wp-image-9" title="demoScreen640480" src="http://designoidgames.com/wp/wp-content/uploads/2010/03/demoScreen640480.jpg" alt="" width="640" height="480" /></a></p>
<p>Demolition Dude has been released, first exclusively on <a href="http://armorgames.com/play/5388/demolition-dude">Armor Games</a>.<br />
After a week, the viral version will be out without a sitelock.</p>
<p><a href="http://armorgames.com/play/5388/demolition-dude">Play it now</a>.</p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2010/03/demolition-dude-released/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2010/03/demolition-dude-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designoid Games site is up!</title>
		<link>http://designoidgames.com/2010/03/designoid-games-site-is-up/</link>
		<comments>http://designoidgames.com/2010/03/designoid-games-site-is-up/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 15:38:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://designoidgames.com/wp/?p=3</guid>
		<description><![CDATA[Designoid Games is a new independent Flash game company. The first game to be officially released by Designoid Games is going to be Demolition Dude this week or early next week. Stay tuned for that stuff.]]></description>
			<content:encoded><![CDATA[<p>Designoid Games is a new independent Flash game company.</p>
<p>The first game to be officially released by Designoid Games is going to be Demolition Dude this week or early next week. Stay tuned for that stuff.</p>
<div id="fcbk_share"><div class="fcbk_like">
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
										<fb:like href="http://designoidgames.com/2010/03/designoid-games-site-is-up/" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
									</div></div>]]></content:encoded>
			<wfw:commentRss>http://designoidgames.com/2010/03/designoid-games-site-is-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

