Ashish Goyal wrote:
>
> Hey Jeremy,
> I just tried your sample and it works fine. If you are naming your
> states as menu labels then @label would work and if you are using data
> as your state names then @data would work.
>
> For example, I added following states in your code:
>
> <mx:states>
>       <mx:State name="Sales">
>             <mx:AddChild>
>                   <mx:Button label="In Sales State"/>
>             </mx:AddChild>
>       </mx:State>
>      
>       <mx:State name="Rentals">
>             <mx:AddChild>
>                   <mx:Button label="In Rental State"/>
>             </mx:AddChild>
>       </mx:State>
>      
>       <mx:State name="Referrals">
>             <mx:AddChild>
>                   <mx:Button label="In Referrals State"/>
>             </mx:AddChild>
>       </mx:State>
> </mx:states>
>
> On selecting menu "Search -> Sales or Rentals or Referrals", I do see
> state changes.
>
> Please attach your complete code if you are still having problems.
>
> -Ashish
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jeremy Rottman
> Sent: Wednesday, March 29, 2006 11:51 AM
> To: [email protected]
> Subject: Re: [flexcoders] Still need some help with my menu bar
>
> Ashish Goyal wrote:
> > Try this:
> >
> > currentState = [EMAIL PROTECTED];
> >
> > -Ashish
> >
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of Jeremy Rottman
> > Sent: Wednesday, March 29, 2006 8:12 AM
> > To: [email protected]
> > Subject: [flexcoders] Still need some help with my menu bar
> >
> > after a few hours of playing with the menu bar issue I was having
> > yesterday, I am still stuck trying to figure out why my menu handler
> > function wont work with my menu bar.
> >
> > This function is suposed to change teh state when someone changes
> > thier selection to one of the child menu items. It appears to change
> > the state, but it does not load the state that is called.
> >
> > function menuHandler( oEvent : * ) : void
> > {
> >       currentState = oEvent.menuItem.getProperty("data");
> > }
> >
> > Here is my menubar again.
> >
> > <mx:MenuBar change="menuHandler(event)" labelField="@label"
> > showRoot="false"  width="100%" height="22" x="1" y="10">
> >       <mx:dataProvider>
> >             <mx:XML xmlns="">
> >                   <menuitem label="Today" data="today" >
> >              </menuitem>
> >                 <menuitem label="Contacts" data="home" >
> >                       <menuitem label="Add/Edit Outside Agent" />
> >                       <menuitem label="Add/Edit Vendor" />
> >                 </menuitem>
> >                 <menuitem label="Search" data="home" >
> >                       <menuitem label="Listing" data="etls" />
> >                       <menuitem label="Sales" />
> >                       <menuitem label="Rentals" />
>
> >                       <menuitem label="Referrals" />
> >                       <menuitem label="Contacts" />
> >                       <menuitem label="HomeSmart Agents" />
> >
> >                 </menuitem>
> >                 <menuitem label="Transactions" data="">
> >                     <menuitem label="Add Listing" data="ntcl" />
> >                         <menuitem label="Add Sale" data="ntcs" />
> >                         <menuitem label="Add Rental" data="ntcr" />
> >                         <menuitem label="Add Referral" data="ntcrf" />
> >                 </menuitem>
> >                 <menuitem label="Marketing" data="">
> >                     <menuitem label="Lead Manager" />
> >                         <menuitem label="Recruiting Manager" />
> >                         <menuitem label="Mass Email" />
> >                         <menuitem label="Mail Merge" />              
> >                 </menuitem>
> >                 <menuitem label="Education">
> >                       <menuitem label="Video Modules" />
> >                       <menuitem label="Schedule" />
>
> >                 </menuitem>
> >                 <menuitem label="Content">
> >
> >                       <menuitem label="Downloads">
> >                             <menuitem label="Add/Edit Download
> > Category" />
> >                             <menuitem label="Add/Edit Downloads" />
> >                       </menuitem>
> >                          <menuitem label="CMS">
> >                             <menuitem label="Add/Edit News Category"
> > />
> >                             <menuitem label="Add/Edit News" />
> >                             <menuitem label="Smart News" />
> >                       </menuitem>    
> >                       <menuitem label="Links" />
> >
> >                 </menuitem>                         
> >                 <menuitem label="Reports">
> >                       <menuitem label="Accounting" />
> >                       <menuitem label="Marketing" />
> >                       <menuitem label="Transactions" />
> >                       <menuitem label="Franchise" />
> >
> >                 </menuitem>
> >                 <menuitem label="Setup">                             
> >                     <menuitem label="Company Information"
> > data="compInfo" hint="Displays Company Information Screen" />
> >                     <menuitem label="Activity Plans" />
> >                     <menuitem label="Commission Plans" />
> >                     <menuitem label="Preferences" />
> >                 </menuitem>
> >                      <menuitem label="Tools">
> >                            <menuitem label="Remote Access" />
> >                            <menuitem label="Cameras" />
> >                            <menuitem label="Video Conference" />
> >                            <menuitem label="Video Email" />      
> >                      </menuitem>
> >             </mx:XML>
> >       </mx:dataProvider>
> > </mx:MenuBar>
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> >
> >
> >
> ------------------------------------------------------------------------
> > YAHOO! GROUPS LINKS
> >
> >     *  Visit your group "flexcoders
> >       <http://groups.yahoo.com/group/flexcoders>" on the web.
> >       
> >     *  To unsubscribe from this group, send an email to:
> >        [EMAIL PROTECTED]
> >
> <mailto:[EMAIL PROTECTED]>
> >       
> >     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >       Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> >
> ------------------------------------------------------------------------
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and
> is
> > believed to be clean.
> Nope that isnt working either. I wish adobe/MM would document this
> stuff. anyone else have an idea.
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "flexcoders
>       <http://groups.yahoo.com/group/flexcoders>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean. 
I see it now Ashish, I had my state named to the data filed in my xml. I 
switched it to @data, and it works just like it did before the switch.

Thank you for your help.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to