4 Replies Latest reply on Dec 30, 2010 8:57 AM by learner_doug

    Simple Way to Detect a MenuItem Click?


           I'm having some trouble finding a way to make this simple setup display an identifier for whatever menuitem the user clicked.


              <mx:MenuBar id="topMenuBar" labelField="@label">
                      <menuitem label="File">
                          <menuitem label="New Document"/>
                          <menuitem label="Update Document"/>
                          <menuitem type="separator" />
                          <menuitem label="Print" />
                          <menuitem type="separator" />
                          <menuitem label="Login / Logout" />
                      <menuitem label="Categories">
                          <menuitem label=""/>
                      <menuitem label="MenuItem C"/>
                      <menuitem label="MenuItem D">
                          <menuitem label="SubMenuItem D-1"
                                    type="radio" groupName="one"/>
                          <menuitem label="SubMenuItem D-2"
                                    type="radio" groupName="one"
                          <menuitem label="SubMenuItem D-3"
                                    type="radio" groupName="one"/>


      Can anyone bring some light into my problem? I just want to be able to make that menu come display via Alert.show an identifier for whichever o the above menu gets clicked by the user.



      When the user clicks on File > New Document, it should come up with an alert showing File > New Document or something to let me identify that the user indeed clicked on that menuitem.