<?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: Disabling an Alert control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Micah Waldman</title>
		<link>http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/comment-page-1/#comment-9008</link>
		<dc:creator>Micah Waldman</dc:creator>
		<pubDate>Tue, 01 Mar 2011 03:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/#comment-9008</guid>
		<description>Peter,

Thanks for all your useful examples. 
I needed to disable the Escape key, as you mention above, so that the user cannot close the alert until I&#039;m ready. I added this line in your loop for disabling the buttons:
&lt;code&gt;
btn.addEventListener(KeyboardEvent.KEY_DOWN, alertKeyDownHandler, false, 100);    // High priority so we can stop propagation
&lt;/code&gt;

and added this handler function:
&lt;code&gt;
private function alertKeyDownHandler(event:KeyboardEvent):void {
	event.stopImmediatePropagation();
}
&lt;/code&gt;
If at some point you want to give the user back the ability to escape, calling removeEventListener(KeyboardEvent.KEY_DOWN, alertKeyDownHandler) restores normal functionality.

Best,
Micah</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Thanks for all your useful examples.<br />
I needed to disable the Escape key, as you mention above, so that the user cannot close the alert until I&#8217;m ready. I added this line in your loop for disabling the buttons:<br />
<code><br />
btn.addEventListener(KeyboardEvent.KEY_DOWN, alertKeyDownHandler, false, 100);    // High priority so we can stop propagation<br />
</code></p>
<p>and added this handler function:<br />
<code><br />
private function alertKeyDownHandler(event:KeyboardEvent):void {<br />
	event.stopImmediatePropagation();<br />
}<br />
</code><br />
If at some point you want to give the user back the ability to escape, calling removeEventListener(KeyboardEvent.KEY_DOWN, alertKeyDownHandler) restores normal functionality.</p>
<p>Best,<br />
Micah</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jody</title>
		<link>http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/comment-page-1/#comment-3944</link>
		<dc:creator>Jody</dc:creator>
		<pubDate>Sun, 19 Oct 2008 03:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/#comment-3944</guid>
		<description>First of all, you work too hard. Secondly, your &quot;About the Author&quot; blurb on adobe.com states that both this blog and your other blog are rarely updated. So untrue! Tell those Dev Center people to change that blurb.

xo</description>
		<content:encoded><![CDATA[<p>First of all, you work too hard. Secondly, your &#8220;About the Author&#8221; blurb on adobe.com states that both this blog and your other blog are rarely updated. So untrue! Tell those Dev Center people to change that blurb.</p>
<p>xo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/comment-page-1/#comment-3945</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 19 Oct 2008 02:46:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/#comment-3945</guid>
		<description>In Flex3, Adobe recommend using the Timer class instead of setTimeout().

See: http://livedocs.adobe.com/flex/3/html/08_Dates_and_times_4.html#122960</description>
		<content:encoded><![CDATA[<p>In Flex3, Adobe recommend using the Timer class instead of setTimeout().</p>
<p>See: <a href="http://livedocs.adobe.com/flex/3/html/08_Dates_and_times_4.html#122960" rel="nofollow">http://livedocs.adobe.com/flex/3/html/08_Dates_and_times_4.html#122960</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/comment-page-1/#comment-3942</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sat, 18 Oct 2008 21:11:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/#comment-3942</guid>
		<description>Dale Fraser,

I agree. I&#039;ll update the article and show how you can loop over the mx_internal button array and disable just the buttons. It seems you can still dismiss the Alert control immediately using the Escape key, but I can try and look into that later.

Peter</description>
		<content:encoded><![CDATA[<p>Dale Fraser,</p>
<p>I agree. I&#8217;ll update the article and show how you can loop over the mx_internal button array and disable just the buttons. It seems you can still dismiss the Alert control immediately using the Escape key, but I can try and look into that later.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale Fraser</title>
		<link>http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/comment-page-1/#comment-3943</link>
		<dc:creator>Dale Fraser</dc:creator>
		<pubDate>Sat, 18 Oct 2008 10:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/10/17/disabling-an-alert-control-in-flex/#comment-3943</guid>
		<description>Not Bad,

Would be better if just the button was disabled, rather than the whole alert, makes the Alert hard to read.</description>
		<content:encoded><![CDATA[<p>Not Bad,</p>
<p>Would be better if just the button was disabled, rather than the whole alert, makes the Alert hard to read.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

