Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
rottmanja #1
Use Menu Bar to Control ViewStacks
Does anyone know of an example of how I can use a menu bar to control a viewstack. I am at a lost right now trying to figure this out.
rottmanja Guest
-
Menu control with Subcateogies
Hi, My ASP.NET web application has a menu on the left side of the page which would show a list of all the categories. It is done using a web... -
Menu Control - Recommendations
We are looking at developing a web application, that we wish to be menu driven (would like to have a drop down menu bar). Also the menu needs to be... -
menu items in control
Hi, I want to have a simple menu in my custom server control, which I've developed in VB ton -
OS Control xtra ( menu)
HELP !!!!!!!!!!!!!!!!!! My work just purchased the OS Control Xtra for me to create a menu with submenus for a project that I am working on in... -
OS Control Xtra (menu)
My work just purchased the OS Control Xtra for me to create a menu with submenus for a project that I am working on in Director MX. I believe I... -
ntsiii #2
Re: Use Menu Bar to Control ViewStacks
Here ya go:
Tracy
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Script><![CDATA[
function menuHandler(oEvent:Object) {
vs1.selectedIndex = oEvent.menuItem.getProperty("data");
}
]]></mx:Script>
<mx:MenuBar width="450" change="menuHandler(event)">
<mx:dataProvider>
<mx:XML>
<menuitem label="View">
<menuitem label="Not used" type="check" data="2A"/>
<menuitem type="separator" />
<menuitem label="Available Views" >
<menuitem label="View 1" type="radio" groupName="one"
data="0"/>
<menuitem label="View 2" type="radio" groupName="one"
data="1"/>
<menuitem label="View 3" type="radio" groupName="one"
data="2" />
</menuitem>
</menuitem>
</mx:XML>
</mx:dataProvider>
</mx:MenuBar>
<mx:ViewStack id="vs1" width="100%" height="100%" borderStyle="solid">
<mx:VBox label="View 1" width="100%" height="100%"
backgroundColor="#CCFF00" >
<mx:Label text="This is View 1"/>
</mx:VBox>
<mx:VBox label="View 2" width="100%" height="100%" >
<mx:Label text="This is View 2"/>
</mx:VBox>
<mx:VBox label="View 3" width="100%" height="100%"
backgroundColor="#FF3399">
<mx:Label text="This is View 3"/>
</mx:VBox>
</mx:ViewStack>
</mx:Application>
ntsiii Guest
-
hanya #3
Re: Use Menu Bar to Control ViewStacks
This doesn't work any more by Flash Builder 4 or Flex4. The problem is the root!
hanya Guest



Reply With Quote

