<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Enabling and disabling Button instances in Flash with ActionScript 3.0</title>
	<atom:link href="http://actionscriptexamples.com/2008/11/25/enabling-and-disabling-button-instances-in-flash-with-actionscript-30/feed/" rel="self" type="application/rss+xml" />
	<link>http://actionscriptexamples.com/2008/11/25/enabling-and-disabling-button-instances-in-flash-with-actionscript-30/</link>
	<description>A bunch of ActionScript 2.0 and ActionScript 3.0 examples*</description>
	<lastBuildDate>Thu, 22 Jul 2010 14:13:10 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: flashCS4</title>
		<link>http://actionscriptexamples.com/2008/11/25/enabling-and-disabling-button-instances-in-flash-with-actionscript-30/comment-page-1/#comment-661</link>
		<dc:creator>flashCS4</dc:creator>
		<pubDate>Wed, 31 Mar 2010 16:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=49#comment-661</guid>
		<description>Yes you can in CS4.. say we have button btnPlay then to disable it...
btnPlay.mouseEnabled  = false;

and to enable it..
btnPlay.mouseEnabled  = true;</description>
		<content:encoded><![CDATA[<p>Yes you can in CS4.. say we have button btnPlay then to disable it&#8230;<br />
btnPlay.mouseEnabled  = false;</p>
<p>and to enable it..<br />
btnPlay.mouseEnabled  = true;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ilike2flash</title>
		<link>http://actionscriptexamples.com/2008/11/25/enabling-and-disabling-button-instances-in-flash-with-actionscript-30/comment-page-1/#comment-625</link>
		<dc:creator>ilike2flash</dc:creator>
		<pubDate>Mon, 11 Jan 2010 14:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=49#comment-625</guid>
		<description>I believe there is also a ‘mouseEnabled’ property you can use to enable and disable buttons.</description>
		<content:encoded><![CDATA[<p>I believe there is also a ‘mouseEnabled’ property you can use to enable and disable buttons.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://actionscriptexamples.com/2008/11/25/enabling-and-disabling-button-instances-in-flash-with-actionscript-30/comment-page-1/#comment-68</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Mon, 08 Dec 2008 16:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=49#comment-68</guid>
		<description>Jimbo,

Sorry, it was a typo in my code. I corrected the entry above, but the revised could is:
&lt;pre lang=&quot;actionscript3&quot; line=&quot;1&quot;&gt;
function clickHandler(evt:MouseEvent):void {
    var btn:Button = evt.currentTarget as Button;
    btn.label = &quot;Ouch!&quot;;
}
&lt;/pre&gt;

Line 2 should have said &lt;code&gt;&lt;em&gt;evt&lt;/em&gt;.target&lt;/code&gt; instead of &lt;code&gt;&lt;em&gt;event&lt;/em&gt;.target&lt;/code&gt;.

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>Jimbo,</p>
<p>Sorry, it was a typo in my code. I corrected the entry above, but the revised could is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #339966; font-weight: bold;">function</span> clickHandler<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #6699cc; font-weight: bold;">var</span> btn<span style="color: #000000; font-weight: bold;">:</span>Button = evt.<span style="color: #004993;">currentTarget</span> <span style="color: #0033ff; font-weight: bold;">as</span> Button;
    btn.label = <span style="color: #990000;">&quot;Ouch!&quot;</span>;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Line 2 should have said <code><em>evt</em>.target</code> instead of <code><em>event</em>.target</code>.</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimbo</title>
		<link>http://actionscriptexamples.com/2008/11/25/enabling-and-disabling-button-instances-in-flash-with-actionscript-30/comment-page-1/#comment-65</link>
		<dc:creator>Jimbo</dc:creator>
		<pubDate>Mon, 08 Dec 2008 13:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=49#comment-65</guid>
		<description>When I try this code, I get a compile-time error for line 24: &lt;code&gt;var btn:Button = event.currentTarget as Button;&lt;/code&gt;

The error is: &lt;blockquote&gt;1120:Access of undefined property event.&lt;/blockquote&gt;
I am cs4 windows. What am I doing wrong?</description>
		<content:encoded><![CDATA[<p>When I try this code, I get a compile-time error for line 24: <code>var btn:Button = event.currentTarget as Button;</code></p>
<p>The error is:<br />
<blockquote>1120:Access of undefined property event.</p></blockquote>
<p>I am cs4 windows. What am I doing wrong?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
