Menu bar of the modules to load for each submenu

I'm creating an application by using the MENU bar, but cannot get a module to open when it is clicked on a submenu. I stripped my app up to bare bones to eliminate other factors. The menu bar has several main options, such as Button1, Button2, Button3, then each has a submenu drop-down. If Button1 has dropdowns Button1Sub1 and Button1Sub2 I want to have a different module launch when you click on one of the submenus.

I managed to use ModuleManager to open a particular module by referring to the creationComplete = "moduleLoadHandler ()" but not by selecting a menu item in the menu bar. " My application has need to be as easy to use, Windows-like as possible. There are a lot of different modules that must be loaded and unloaded.

I have attached an image screenshot of my project tree and circled the ActionModule.swf file to show its location.

I have attached my code below:

" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="vertical"creationComplete =" creationHandler (); » >

< mx:Script >

<! [CDATA]

Import mx.controls.menuClasses.IMenuBarItemRenderer;

Import mx.controls.MenuBar;

Import mx.controls.menuClasses.MenuBarItem;

Import mx.controls.Alert;

import mx.modules.Module;

import mx.events.ModuleEvent;

import mx.modules.ModuleManager;

import mx.modules.IModuleInfo;

import mx.rpc.events.ResultEvent;

import mx.rpc.events.FaultEvent;

import mx.events.FlexEvent;

import mx.events.MenuEvent;

Import mx.collections. *;

public var _moduleInfo:IModuleInfo;

[Bindable]

public var menuBarCollection:XMLListCollection;

private var menubarXML:XMLList =

<>

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

< label menuitem = "1-A MenuItem" data = "1a" itemClick = "moduleLoadHandler ()" / >

< label menuitem = "MenuItem 1-B" data = 1 'b' / >

< / menuitem >

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

< label menuitem = "2-A MenuItem" type = "check data" = "2" / >

< type menuitem = "separator" / >

< label menuitem = "MenuItem 2-B" >

< label menuitem = "SubMenuItem 3A" type = "radio".

groupName = "one" data = "3" / >

< label menuitem = "SubMenuItem 3-B" type = "radio".

groupName = "one" data = "3B" / >

< / menuitem >

< / menuitem >

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

< label menuitem = "MenuItem 3-A" data = "3" / >

< label menuitem = "MenuItem 3-B" data = "3B" / >

< / menuitem >

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

< label menuitem = "4A MenuItem" data = "4A" / >

< label menuitem = "4-B MenuItem" data = "4B" / >

< / menuitem >

<>/.

private function creationHandler (): void {}

menuBarCollection = new XMLListCollection (menubarXML);

}

private void moduleLoadHandler(event:ModuleEvent):void {}

canvas.addChild (_moduleInfo.factory.create () in Module);

_moduleInfo = ModuleManager.getModule ('ActionModule.swf');

_moduleInfo.addEventListener (ModuleEvent.READY, moduleLoadHandler);

_moduleInfo.load ();

}

Event handler for the MenuBar control's itemClick event.

private void menuHandler(event:MenuEvent):void {}

Do not open the alert for a menu bar that

Opens a pop-up submenu.

If (event.item.@data! = 'top') {}

Alert.Show ("Label:" + event.item.@label + "\n" +)

("Data:" + event.item.@data, 'Clicked menu' item);

//}

}

private void onTopSelection(event:MenuEvent):void {}

var mb:MenuBar is event.target as menu bar;.

var selectedIndex:int = mb.selectedIndex;

for (var i: int = 0; i < mb.menuBarItems.length; i ++) {}

{if(i==SelectedIndex)}

(mb.menuBarItems [i] as MenuBarItem) .setStyle ("fontWeight", "bold");

}

else {}

(mb.menuBarItems [i] as MenuBarItem) .setStyle ("fontWeight", "normal");

}

}

}

[]] >

< / mx:Script >

< mx:Canvas id = "canvas" height = "75%" width = "75%".

paddingTop = "10" paddingLeft = "10" >

"< mx:MenuBar labelField="@label "itemClick ="menuHandler (event); "dataProvider ="{menuBarCollection}"change =" onTopSelection (event) "/ >"

< / mx:Canvas >

< / mx:Application >

I think it should look like:

function menuHandler(event:MenuEvent):void

{

moduleLoader.url = event.item.@data

}

Alex Harui

Flex SDK Developer

Adobe Systems Inc..

Blog: http://blogs.adobe.com/aharui

Tags: Flex

Similar Questions

  • How can I combine the navigation bar and the menu bar on the same line to save space?

    V29 Firefox seems to be a huge not backward in customization. I need to save room for the content so already I disabled the tabs and combined in the menu bar and the navigation bar on the same line. The url space is too long anyway. Now with v29 all my customization is gone and I can't get it back. I can move me is more points on the navigation bar to combine it with the menu bar. Why this was done? It limits only my ability to customize my browser? I'm very frustrated that you had a great browser and ruined.

    You should see Classic theme restaurateur, it contains many parameters. This module applies to customize Firefox 29. https://addons.Mozilla.org/en-us/Firefox/addon/classicthemerestorer/

  • How can I display the menu bar in the window choose

    How can I view in the menu bar in the window of flight selec t

    Hello

    1. are you referring to Microsoft Flight Simulator or Microsoft Flight?

    If you have a problem with Microsoft Flight, then I suggest you to get in touch with Flight support to improve assistance on the issue:

    https://microsoftflight.com/en-us/support/

    For Microsoft Flight Simulator then contact from this link below: http://www.microsoft.com/Products/Games/FSInsider/tips/Pages/ContactingTechnicalSupport.aspx

    Hope this information is useful.

  • Menu bar on the book too small Surface in Photoshop, Dreamweaver and bridge

    Hello

    I installed CSS5. 5 on my new laptop Surface book. The problem ist that menu bars and tool of Photoshop, Bridge and Dreamweaver toolbar appear so small so that I can't read it.

    The interesting thing is that InDesign, Illustrator and Fireworks are absolutely correctly installed and the toolbar and the menu bar have the right size and I can read it easily.

    These have the same size as in Excel or Word. I reinstalled the full Suite of CSS but the problem sovled isnot. Does anyone have an idea help?

    See the little icon in advance at the start of Photoshopn:


    photoshop_start.jpg

    See menu bar and the toolbar in Photoshop (the same thing happens with Dreamweaver and bridge):

    photoshop_menubar.jpg

    See the correct size of the start at the start of InDesign icon:

    InDesign_start.jpg

    And in InDesign, Illustrator, and Fireworks, the toolbar and the menu bar have the right size:


    InDesign_menu.jpg

    Does anyone have a solution for this problem? I have already installed the CSS Suite for the second time, but there is no change

    and Dreamweaver, Photoshop, and Bridge were too small and not readable menu and the toolbar.

    I would appreciate your help!

    Thank you

    Paul

    Turn on the set 200% across the user interface in Photoshop preferences.

  • How to properly align the menu bar in the width column fixed

    Hello

    I finally make the transition to Dreamweaver 8 for CS5 and basically completely away from the basic tabular presentation.   I looked at many tutorials on youtube or other sites and have not been able to find a way to do what I want to do.  Basically, I use the Dreamweaver 1 set, model of header and column footer. I want to have two horizontal menu bars (one at the bottom of the image header and the other at the top of the header of the image I used CSS and bulleted lists to create the bar menu (or least).)  The bottom seems to be ok.  The menu bar doesn't have the elements that will completely on the screen - there is no link to items in the middle where is the logo and then 1 item name to the right.  So I created a menu bar that covers the 5 elements that is aligned to the left of the column wide 960.  My challenge is to get the menu bar right (which is only 1 point-mailing list) to align at the top, then to the right of the column 960. In the element of class #mailinglistbar, when I put the absolute positioning and placement (top right of 0 and 0), he of on top but puts zero point compared to the full browser width. I want the words "mailing list" to be aligned to the right of the column 960 (basically right of Andrew Powell logo and above the hore) I tried all sorts of things and can't perform the alignment of the column.  Perhaps there is a different way, I should do this, rather than two separate menu bars to the top horizontal menu.  Any suggestion would be appreciated.  See the link below for the file.

    http://blueyondermediagroup.com/andrewpowell/Powell.htm

    Thank you

    Kirk

    Replace by the following style rules

    #topleftmenubar {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 14px;
         height: 27px;
         width: 390px;
         float: left;
    }
    #topleftmenubar ul {
         list-style-type: none;
    }
    #topleftmenubar ul li a {
         font-size: 16px;
         color: #FC9;
         text-decoration: none;
         display: block;
         float: left;
         padding-right: 12px;
         padding-left: 12px;
    }
    #topleftmenubar ul li a:hover {
         color: #C90;
    }
    
    #mailinglistbar {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 14px;
         height: 27px;
         width: 122px;
         float: right;
    }
    #mailinglistbar ul {
         list-style-type: none;
    }
    #mailinglistbar ul li a {
         font-size: 16px;
         color: #FC9;
         text-decoration: none;
         display: block;
         float: left;
         padding-right: 12px;
         padding-left: 12px;
    }
    #mailinglistbar ul li a:hover {
         color: #C90;
    }
    

    GRAMPS

  • remove the menu bar on the secondary monitor

    We use 2 monitors. We have upgraded to El Capitan and must be able to remove the menu bar on the top of the secondary computer.

    How can I do this?

    its been a while but it might be:

     > System Preferences > Mission Control

    turn on "screens have separate workspaces.

    and then disconnect you and back in.

  • Stop does not appear on the menu bar on the 29.0.1 Version. How can I install?

    Stop does not appear in the menu bar on the 29.0.1 Version and I can't find the icon in the Customize menu. Simply, he seems to have disappeared. I would also like the words under the menu icons. Also the icon charge cannot be moved or customized.

    I HATE IT WHEN SITES ARE COMING OUT WITH A NEW "STREAMLINED" APPEARANCE THIS MEANS LESS AND LESS FEATURES AND MORE DIFFICULT TO USE.

    Help!

    Have you tried classic restaurateur theme? https://addons.Mozilla.org/en-us/Firefox/addon/classicthemerestorer/

  • How can I move my favorites in the menu bar of the bookmarks toolbar?

    Once I upgraded my firefox to version 6, all my favorites that were previously in my bookmarks bar are now in the menu bar and the bookmarks bar appears just with no button. How can I move back to their own bar bookmarks? I would like to hide the menu bar.

    Thank you.

    Make sure the bookmarks toolbar is visible and "Bookmarks Toolbar items" are always placed on the bookmarks toolbar.

    If the menu bar is hidden, then press F10, or press and hold the ALT key, which should make the "menu bar" appear.

    Make sure the toolbars like the toolbar 'Navigation' and the 'personal bar' are visible: "view > toolbars".

    • Open the Customize via "view > toolbars > customize" or "Firefox > Options > toolbars" and check the "Bookmarks Toolbar items" are on the personal bar
    • If the "Bookmarks Toolbar items" is not on the bookmarks toolbar, then FRY it in the toolbar palette in the window the bookmarks toolbar Customize
    • If you do not see the "Bookmarks Toolbar items" or other items which do not appear in the palette of the toolbar or a toolbar, then click on the button "Restore Default Set"
  • How to restore the drop down from the menu bar at the top that contains bookmarks?

    I tried to remove the Yahoo toolbar, when I turned off accidentally unrolling of the menu bar at the top that contains bookmarks. How to restore the menu drop-down?

    Is s.o.

    In addition, what happened to the file, edit and view menus? if you want to have the menu bar displayed normally.

  • How can I keep the dock and menu bar in the window

    How can I keep the dock and menu bar in the window

    First of all, go to System Preferences and select general:

    Under the dark menu and dock option, uncheck "hide and show the menu bar automatically".

    Go back and select Dock Prefs system:

    Make sure that "automatically hide / show the dock" is not checked.

  • In Windows Mail how can I get the answer, menu forward on top of the menu bar on the emails?

    In Windows Mail how can I get the answer, menu forward on top of the menu bar on the emails?

    I don't think that you can move the toolbar above the Menu bar. Or is the toolbar missing? If it is not present, right-click on an empty spot on the menu bar and check the toolbar.
  • My XI Acrobat Standard 11.0.09 lost menu bar (F9) and crazy jumps full screen, losing windows buttons high bar, passing just above the menu bar with the mouse cursor, without clicking.

    My XI Acrobat Standard 11.0.09 lost menu bar (F9) and crazy jumps full screen, losing windows buttons high bar, passing just above the menu bar with the mouse cursor, without clicking.

    Yes, it's important somehow. Kapersky broke it somehow and fixed. http://Forum.Kaspersky.com/index.php?showtopic=307391&HL=Adobe

  • I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. Help

    I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. HELP PLEASE. previous e-mail files are under mail then mail.earthlink* .net and each of the five mail .net is an email address I have. I can't find a way to identify each file by email to the specific email address (IE mail.my E-mail name.net) so I can copy the files and emails from the past to the email addresses now under tbird. previous installed e-mail identities may not be the current configuration of e-mail files in tbird. I think that I must be sure that mail.name.net matches the previous mail.name.net to be able to copy and paste the old to the new. is there a way to find the file name correct the old email and correspond to the new? all my emails very important information are mostly in the old mail electronic id and must be available in the identification of email again (but same) how can I do this?

    http://KB.mozillazine.org/Importing_folders

    Use this module.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/ImportExportTools/

  • Is it possible to create a tag that lists the individual labels [keywords] for each position? The current {tag_blogtaglist} creates an endless list of tags.

    Is it possible to create a tag that lists the individual labels [keywords] for each position? The current {tag_blogtaglist} creates an endless list of tags.

    If you can get hands on with the ID of blog post that you can list the tags assigned to this post particularly blog using module_data. It would be only possible with the new BC. Active following rendering engine. Here are some resources to point you in the right direction: how to activate the BC. Next - http://docs.businesscatalyst.com/developers/liquid/introduction-to-liquid#enable how to use module_data - odule_data http://docs.businesscatalyst.com/developers/liquid/consuming-apis-in-the-front-end-using-m install app BC API discovered to get you started on the syntax - http://docs.businesscatalyst.com/developers/apps/bc-api-discovery module data that lists the tags assigned to a blog post looks like this: {module_data = 'blogposts' version = "v3" field resource = subresource 'tag' = "tags" resourceId = collection "303870" = "myData"} resourceId is the blog ID to render tags for. Hope this helps, Mihai

  • Need to find the version number referring to the last name change for each emplid.

    emplIDName ageVersion
    --------   -----------
    1ABC252
    1ABC265
    1def279
    1def2815
    1def2918
    2JKL155
    2MNO168
    2MNO1711
    2PQR1820

    Need to find the version number referring to the last name change for each emplid.

    As indicated by the version number change when there is change in age as well, but I need a query that gives the version number referring to the last name change for each emplid.

    with

    DATA_TABLE (EmplId, Name, Age, version) as

    (select 1, 'abc', 25, 2 double Union all

    Select 1, 'abc', 26, 5 Union double all the

    Select 1, 'def', 27, 9 double Union all

    Select 1, 'def', 28, 15 double Union all

    Select 1, 'def', 29, 18 double Union all

    Select 2, 'jkl', 15 5 Union double all the

    Select 2, 'mno', 16, 8 double Union all

    Select 2, 'mno', 17, 11 double Union all

    Select 2, 'pqr', 18, 20 double

    )

    Select emplid,

    Max (Name) name of Dungeon (dense_rank last order by version).

    Max (Age) age of Dungeon (dense_rank last order by version).

    version Max (version)

    from (select emplid, name, version,)

    -case where name! = lag(name,1,name) on (emplid version order partition)

    then "renamed".

    end change

    of data_table

    )

    where the change is not null

    Emplid group

    EMPLID NAME AGE VERSION
    1 def 27 9
    2 PQR 18 20

    Concerning

    Etbin

Maybe you are looking for