Hi Jeremy,
You can navigate through a ViewStack by setting its selectedIndex
property to change views. If you want a MenuBar to control the
navigation of the ViewStack, you probably want to add logic to the
MenuBar's 'change' event handler to listen to what item was selected and
then navigate the ViewStack accordingly.
Below is some pseudo-code:
import mx.events.MenuEvent;
<mx:MenuBar id="mb" change="handleChange(event)" />
private function handleChange(e:MenuEvent):Void
{
switch (e.menuItem.attributes.label)
{
case: "Marketing":
vs.selectedIndex = 2;
break;
...
...
}
}
Deepa
Flex Team
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy Rottman
Sent: Friday, October 21, 2005 1:44 PM
To: [email protected]
Subject: [flexcoders] Controlling ViewStacks with menu bar.
I have been working with view stacks, and trying to control them with
a menubar. However I am unable to get it to work together. Does anyone
know how this can ben done.
Any help would be greatly appreciated.
--
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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/