<?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: Checking to see if a Flex CheckBox is selected before allowing a user to press a Button</title>
	<atom:link href="http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 13 Feb 2012 01:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Priyanka</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-7004</link>
		<dc:creator>Priyanka</dc:creator>
		<pubDate>Sun, 14 Feb 2010 05:46:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-7004</guid>
		<description>Nice blog ...I loved It...</description>
		<content:encoded><![CDATA[<p>Nice blog &#8230;I loved It&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhilash Nagar</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-6388</link>
		<dc:creator>Abhilash Nagar</dc:creator>
		<pubDate>Wed, 18 Nov 2009 10:24:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-6388</guid>
		<description>Thanks for the example.I got question - 

How about if the checkbox is on another page or component &amp; i want to enable a button on separate component on the selection of checkbox.Also I want to know if there is any count property associated with the checkbox.</description>
		<content:encoded><![CDATA[<p>Thanks for the example.I got question &#8211; </p>
<p>How about if the checkbox is on another page or component &amp; i want to enable a button on separate component on the selection of checkbox.Also I want to know if there is any count property associated with the checkbox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn Puyear</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-4537</link>
		<dc:creator>Shawn Puyear</dc:creator>
		<pubDate>Mon, 13 Jul 2009 16:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-4537</guid>
		<description>#2 combined with #3 worked PERFECT!!!  Thank you!</description>
		<content:encoded><![CDATA[<p>#2 combined with #3 worked PERFECT!!!  Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1062</link>
		<dc:creator>Ali</dc:creator>
		<pubDate>Fri, 25 Jul 2008 03:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1062</guid>
		<description>sweet web site dude!</description>
		<content:encoded><![CDATA[<p>sweet web site dude!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1057</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 02 Apr 2008 21:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1057</guid>
		<description>Thank you so much, I used the XML example (I&#039;m more familiar with XML than actionscript) and it worked perfectly. I have one last question/request however.

In the project I&#039;m using, I use a seperate MXML file and put it into the main project, and the way FLEX refers to it is by using some  command that I haven&#039;t been able to find any information online. I was wondering if you knew how to have a checkbox inside this seperate MXML file and have it make the button appear in the main MXML file. I&#039;m sorry if it&#039;s not too clear.

-Nick</description>
		<content:encoded><![CDATA[<p>Thank you so much, I used the XML example (I&#8217;m more familiar with XML than actionscript) and it worked perfectly. I have one last question/request however.</p>
<p>In the project I&#8217;m using, I use a seperate MXML file and put it into the main project, and the way FLEX refers to it is by using some  command that I haven&#8217;t been able to find any information online. I was wondering if you knew how to have a checkbox inside this seperate MXML file and have it make the button appear in the main MXML file. I&#8217;m sorry if it&#8217;s not too clear.</p>
<p>-Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1061</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 01 Apr 2008 23:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1061</guid>
		<description>Nick,

Do either of these work for you?

&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot;&gt;

    &lt;mx:Panel title=&quot;Any&quot; width=&quot;320&quot;&gt;
        &lt;mx:CheckBox id=&quot;check1a&quot; label=&quot;Check 1.A&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check2a&quot; label=&quot;Check 2.A&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check3a&quot; label=&quot;Check 3.A&quot; /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button label=&quot;Button A&quot; enabled=&quot;{check1a.selected &#124;&#124; check2a.selected &#124;&#124; check3a.selected}&quot; /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

    &lt;mx:Panel title=&quot;All&quot; width=&quot;320&quot;&gt;
        &lt;mx:CheckBox id=&quot;check1b&quot; label=&quot;Check 1.B&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check2b&quot; label=&quot;Check 2.B&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check3b&quot; label=&quot;Check 3.B&quot; /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button label=&quot;Button B&quot; enabled=&quot;{check1b.selected &amp;&amp; check2b.selected &amp;&amp; check3b.selected}&quot; /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Or, using ActionScript instead of MXML:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;vertical&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function chkA():void {
                btnA.enabled = (check1a.selected &#124;&#124; check2a.selected &#124;&#124; check3a.selected);
            }
            private function chkB():void {
                btnB.enabled = (check1b.selected &amp;&amp; check2b.selected &amp;&amp; check3b.selected);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Panel title=&quot;Any&quot; width=&quot;320&quot;&gt;
        &lt;mx:CheckBox id=&quot;check1a&quot; label=&quot;Check 1.A&quot; change=&quot;chkA();&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check2a&quot; label=&quot;Check 2.A&quot; change=&quot;chkA();&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check3a&quot; label=&quot;Check 3.A&quot; change=&quot;chkA();&quot; /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button id=&quot;btnA&quot; label=&quot;Button A&quot; creationComplete=&quot;chkA();&quot; /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

    &lt;mx:Panel title=&quot;All&quot; width=&quot;320&quot;&gt;
        &lt;mx:CheckBox id=&quot;check1b&quot; label=&quot;Check 1.B&quot; change=&quot;chkB();&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check2b&quot; label=&quot;Check 2.B&quot; change=&quot;chkB();&quot; /&gt;
        &lt;mx:CheckBox id=&quot;check3b&quot; label=&quot;Check 3.B&quot; change=&quot;chkB();&quot; /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button id=&quot;btnB&quot; label=&quot;Button B&quot; creationComplete=&quot;chkB();&quot; /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>Do either of these work for you?</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"&gt;

    &lt;mx:Panel title="Any" width="320"&gt;
        &lt;mx:CheckBox id="check1a" label="Check 1.A" /&gt;
        &lt;mx:CheckBox id="check2a" label="Check 2.A" /&gt;
        &lt;mx:CheckBox id="check3a" label="Check 3.A" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button label="Button A" enabled="{check1a.selected || check2a.selected || check3a.selected}" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

    &lt;mx:Panel title="All" width="320"&gt;
        &lt;mx:CheckBox id="check1b" label="Check 1.B" /&gt;
        &lt;mx:CheckBox id="check2b" label="Check 2.B" /&gt;
        &lt;mx:CheckBox id="check3b" label="Check 3.B" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button label="Button B" enabled="{check1b.selected &amp;amp;&amp;amp; check2b.selected &amp;amp;&amp;amp; check3b.selected}" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, using ActionScript instead of MXML:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function chkA():void {
                btnA.enabled = (check1a.selected || check2a.selected || check3a.selected);
            }
            private function chkB():void {
                btnB.enabled = (check1b.selected &#038;&#038; check2b.selected &#038;&#038; check3b.selected);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Panel title="Any" width="320"&gt;
        &lt;mx:CheckBox id="check1a" label="Check 1.A" change="chkA();" /&gt;
        &lt;mx:CheckBox id="check2a" label="Check 2.A" change="chkA();" /&gt;
        &lt;mx:CheckBox id="check3a" label="Check 3.A" change="chkA();" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button id="btnA" label="Button A" creationComplete="chkA();" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

    &lt;mx:Panel title="All" width="320"&gt;
        &lt;mx:CheckBox id="check1b" label="Check 1.B" change="chkB();" /&gt;
        &lt;mx:CheckBox id="check2b" label="Check 2.B" change="chkB();" /&gt;
        &lt;mx:CheckBox id="check3b" label="Check 3.B" change="chkB();" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button id="btnB" label="Button B" creationComplete="chkB();" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1060</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 01 Apr 2008 23:10:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1060</guid>
		<description>Nevermind, I&#039;ve figured the problem out. However, would it be possible to have multiple checkboxes, and if any of them are selected, the button would appear?</description>
		<content:encoded><![CDATA[<p>Nevermind, I&#8217;ve figured the problem out. However, would it be possible to have multiple checkboxes, and if any of them are selected, the button would appear?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1059</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 01 Apr 2008 22:53:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1059</guid>
		<description>Sorry, it didn&#039;t show my script i used while posting.</description>
		<content:encoded><![CDATA[<p>Sorry, it didn&#8217;t show my script i used while posting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1058</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 01 Apr 2008 22:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1058</guid>
		<description>I&#039;m having a little problem with this script.

I&#039;m using the same button in different states, and I&#039;m just using the  function to make the button go to the next state, depending on which state its already in. However, lets say in state 1 i want the button enabled, but in state 2 I want it to be disabled, and only enabled if the checkbox is selected, i used the

However, when I do so, the button doesn&#039;t enable itself as soon as the checkbox is selected, but if i select the checkbox, go back to state 1, and then return to state 2, then the button is enabled.

Any insight on how to fix this?

-Nick</description>
		<content:encoded><![CDATA[<p>I&#8217;m having a little problem with this script.</p>
<p>I&#8217;m using the same button in different states, and I&#8217;m just using the  function to make the button go to the next state, depending on which state its already in. However, lets say in state 1 i want the button enabled, but in state 2 I want it to be disabled, and only enabled if the checkbox is selected, i used the</p>
<p>However, when I do so, the button doesn&#8217;t enable itself as soon as the checkbox is selected, but if i select the checkbox, go back to state 1, and then return to state 2, then the button is enabled.</p>
<p>Any insight on how to fix this?</p>
<p>-Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John C. Bland II</title>
		<link>http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/comment-page-1/#comment-1056</link>
		<dc:creator>John C. Bland II</dc:creator>
		<pubDate>Tue, 18 Sep 2007 05:18:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/13/checking-to-see-if-a-flex-checkbox-is-selected-before-allowing-a-user-to-press-a-button/#comment-1056</guid>
		<description>Exactly.</description>
		<content:encoded><![CDATA[<p>Exactly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

