<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Coding MovieClips as Buttons in AS3</title>
	<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/</link>
	<description>Actionscript Tutorials and Articles for AS3 and AS2 by Rob Gungor.</description>
	<pubDate>Wed, 10 Mar 2010 07:03:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
		<item>
		<title>By: Thales</title>
		<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-338</link>
		<dc:creator>Thales</dc:creator>
		<pubDate>Wed, 26 Nov 2008 18:23:10 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-338</guid>
		<description>Man, i am braziliam sorry for my bad english, i have a big question for you, for example:

i have 4 buttons and when i click in the first all of then excpect the clicked must be activate and going to frame 1 .
when i clicked in the 2 button bt1,bt3,bt4 must be desactivated..i know that in the actionscript 2 but in 3 i dont know and i dont find the code in the foruns!

can you help me? or You understand what i wrote? huehue.

thanks men</description>
		<content:encoded><![CDATA[<p>Man, i am braziliam sorry for my bad english, i have a big question for you, for example:</p>
<p>i have 4 buttons and when i click in the first all of then excpect the clicked must be activate and going to frame 1 .<br />
when i clicked in the 2 button bt1,bt3,bt4 must be desactivated..i know that in the actionscript 2 but in 3 i dont know and i dont find the code in the foruns!</p>
<p>can you help me? or You understand what i wrote? huehue.</p>
<p>thanks men</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-126</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 10 Jun 2008 13:50:37 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-126</guid>
		<description>Bachtiar:

"this.mouseChildren = false" just solved so many of my problems.  I don't know why that was so hard for me to find. Thanks.</description>
		<content:encoded><![CDATA[<p>Bachtiar:</p>
<p>&#8220;this.mouseChildren = false&#8221; just solved so many of my problems.  I don&#8217;t know why that was so hard for me to find. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos</title>
		<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-117</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Thu, 15 May 2008 13:01:00 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-117</guid>
		<description>Man - i have just started to work with Flash and AS3 and this small "button" tutorial realy helped me a lot!
Thanks pal!

Greetings from Hamburg in Germany,
Carlos</description>
		<content:encoded><![CDATA[<p>Man - i have just started to work with Flash and AS3 and this small &#8220;button&#8221; tutorial realy helped me a lot!<br />
Thanks pal!</p>
<p>Greetings from Hamburg in Germany,<br />
Carlos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bachtiar Rahady</title>
		<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-82</link>
		<dc:creator>Bachtiar Rahady</dc:creator>
		<pubDate>Mon, 11 Feb 2008 06:48:24 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-82</guid>
		<description>There is another think.. if You have the children inside those buttonMode MovieClip (eg: TextField, for label), You have to set it's mouse interaction to false, otherwise, whenever the mouse over it, it will back to pointer cursor, not handcursor.

The script will look like this:

private function initMovieButton():void {
 this.buttonMode = true;
 this.useHandCursor = true;
 this.mouseChildren = false;
}</description>
		<content:encoded><![CDATA[<p>There is another think.. if You have the children inside those buttonMode MovieClip (eg: TextField, for label), You have to set it&#8217;s mouse interaction to false, otherwise, whenever the mouse over it, it will back to pointer cursor, not handcursor.</p>
<p>The script will look like this:</p>
<p>private function initMovieButton():void {<br />
 this.buttonMode = true;<br />
 this.useHandCursor = true;<br />
 this.mouseChildren = false;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Chapa</title>
		<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-22</link>
		<dc:creator>Jake Chapa</dc:creator>
		<pubDate>Wed, 12 Dec 2007 06:07:20 +0000</pubDate>
		<guid>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comment-22</guid>
		<description>here's an EasyButton class I created that will let you do this much quicker. To apply it to an item on stage, give it the base class of 'EasyButton' and class of 'EasyButton.instanceName'


-Jake

package
{  
	import flash.display.*;
	import flash.events.*;
	import flash.text.*;

	public class EasyButton extends MovieClip
	{
		private var __onClick:Function;
		
		public function EasyButton()
		{
			__onClick = function(){};
			
			this.buttonMode = true;
			this.useHandCursor = true;
			
			this.addEventListener(MouseEvent.CLICK, __onClick);
			this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
			this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
			this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
			this.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
			
			this.gotoAndStop("up");	// initial state
		}
		
		public function set onClick(func:Function):void
		{
			this.removeEventListener(MouseEvent.CLICK, __onClick);
			__onClick = func;
			this.addEventListener(MouseEvent.CLICK, __onClick);
		}
		
		public function get onClick():Function
		{
			return __onClick;
		}
		
		function onMouseOver(event:Event):void
		{
			this.gotoAndStop("over");
		}
		
		function onMouseOut(event:Event):void
		{
			this.gotoAndStop("up");
		}
		
		function onMouseDown(event:Event):void
		{
			this.gotoAndStop("down");
		}
		
		function onMouseUp(event:Event):void
		{
			this.gotoAndStop("up");
		}
	}
}</description>
		<content:encoded><![CDATA[<p>here&#8217;s an EasyButton class I created that will let you do this much quicker. To apply it to an item on stage, give it the base class of &#8216;EasyButton&#8217; and class of &#8216;EasyButton.instanceName&#8217;</p>
<p>-Jake</p>
<p>package<br />
{<br />
	import flash.display.*;<br />
	import flash.events.*;<br />
	import flash.text.*;</p>
<p>	public class EasyButton extends MovieClip<br />
	{<br />
		private var __onClick:Function;</p>
<p>		public function EasyButton()<br />
		{<br />
			__onClick = function(){};</p>
<p>			this.buttonMode = true;<br />
			this.useHandCursor = true;</p>
<p>			this.addEventListener(MouseEvent.CLICK, __onClick);<br />
			this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);<br />
			this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);<br />
			this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);<br />
			this.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);</p>
<p>			this.gotoAndStop(&#8221;up&#8221;);	// initial state<br />
		}</p>
<p>		public function set onClick(func:Function):void<br />
		{<br />
			this.removeEventListener(MouseEvent.CLICK, __onClick);<br />
			__onClick = func;<br />
			this.addEventListener(MouseEvent.CLICK, __onClick);<br />
		}</p>
<p>		public function get onClick():Function<br />
		{<br />
			return __onClick;<br />
		}</p>
<p>		function onMouseOver(event:Event):void<br />
		{<br />
			this.gotoAndStop(&#8221;over&#8221;);<br />
		}</p>
<p>		function onMouseOut(event:Event):void<br />
		{<br />
			this.gotoAndStop(&#8221;up&#8221;);<br />
		}</p>
<p>		function onMouseDown(event:Event):void<br />
		{<br />
			this.gotoAndStop(&#8221;down&#8221;);<br />
		}</p>
<p>		function onMouseUp(event:Event):void<br />
		{<br />
			this.gotoAndStop(&#8221;up&#8221;);<br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
