So you question has nothing to do with menu, is that correct?

 

What exactly do you mean by "redirect to test.swf"?  What is you application
architecture?  Is test.swf an application, a component, a module, or what?

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of guess what
Sent: Saturday, April 25, 2009 11:26 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex Menu Basic Question

 






To be precise what do i do on the click event . I got the value of Action
set on the menu item . Can you kindly explain how do i recdirect to
test.swf.

<menuitem label="Example" data="top">

                        <menuitem label="MenuItem A" action="test.swf"/>

                        <menuitem label="MenuItem B" data="1B"/>

</menuitem>

 // Event handler for the MenuBar control&apos;s itemClick event.

            private function menuHandler(event:MenuEvent):void  {

                  Alert.show(event.it...@action);   

                

                

                

            }

  _____  

From: Tracy Spratt <tr...@nts3rd.com>
To: flexcoders@yahoogroups.com
Sent: Saturday, April 25, 2009 8:10:58 PM
Subject: RE: [flexcoders] Flex Menu Basic Question

On your menu, specify a handler for the itemClick event.  That event will
have a reference to the item clicked, fro mwhich you can determine what
action to take.  I typically include a "command" or "action" or "index"
attribute in the menu data, then get that value in the handler, and use a
switch() statement to define the processing.

 

A side note, the top-level menu items do not dispatch itemClick events.  If
you want to take action from a top-level menu item, you also need to listen
to the plain click event, and conditionally process only the correct clicks.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On
Behalf Of myworld100us
Sent: Saturday, April 25, 2009 11:02 PM
To: flexcod...@yahoogro ups.com
Subject: [flexcoders] Flex Menu Basic Question

 





I am posting a very basic question . I am trying to use Flex menus on my web
page . I have built the menu but I am not sure how to do navigation . All i
could do is if set Data for menu item i could do an alert to get Data .
What I want is if user click on Menu A it should redirect or load a SWF file
, similarly if user clicks on Menu B it should redirect or load a separate
file. It similar to something link View Stack . But problem with View Stack
is I cant define children for MX: View Stack .

 



Reply via email to