Opening a page in a browser when a choice is selected from the Menu

The choice item is defined in MXML as
<menuitem label="Help">
                <menuitem label="Documentation" data="documentation.swf" />
            </menuitem>
Code on what to do when it is selected is
<mx:ApplicationControlBar id="appBar" x="0" y="0" dock="false" visible="false" width="100%">
        <mx:MenuBar id="appNavigation" dataProvider="{appNavigation_dp}" labelField="@label" iconField="@icon" itemClick="menuBarButtons(event);" />
    </mx:ApplicationControlBar>
Function called menuBarButtons is
private function menuBarButtons(event:MenuEvent):void{
                var pageName:String = event.item.@data;
                switch(pageName){
case 'Documentation':
                    var url:URLRequest = new URLRequest('http://www.mydocumentation.com');  
                        navigateToURL(url,'_blank');
                    break;
I have done the required imports such as
import flash.net.navigateToURL;
            import flash.net.URLRequest;
            import flash.net.URLVariables;
When I click on the Documentation option from the menu, no new URL opens
while I am expecting a page with a URL http://www.mydocumentation.com to be
opened
What am I missing?
Any suggestions would be appreciated.

try
var pageName:String = event.item.@label;
instead of
var pageName:String = event.item.@data;

Similar Messages

  • Air port always asks for password when a network is selected from the list

    If I have my wirless router on before my mac, when i switch on my mac it connects fine, using the password I previously told it to remember. However if my mac is on first, then the router when I select the router in the wirless list it prompts for a password.
    If I just switch the Airport on my mac off and on again it just connects fine. Is there a way to avoid having to swith airport off and on all the time?
    This is only a problem on my Macbook 10.5.7, connection is fine all the time from my Mini 10.4.8
    Thank you to anyone who can help

    I have not asked same question many times in the same forum.
    My previous question was very different from this
    See the question;
    http://forums.adobe.com/message/5775512

  • CA website support page provides a main heading that requires a selection from the options provided. These options do not show. Other browsers operate correctly.

    This webpage does not present correctly. It is a support page which provides for a user to make a selection. These selection options do not appear. Other browsers such as Iexplorer and Google present correctly.

    This webpage does not present correctly. It is a support page which provides for a user to make a selection. These selection options do not appear. Other browsers such as Iexplorer and Google present correctly.

  • Display a message when  an item is selected from a dropdownlist

    Hi,
    I need to display a message(kind of alert message) when certain items are selected from the dropdownlist.
    Let me know what is a good way to do this in web elements?
    Thanks

    hello,
    unfortunately there is no validation / alerting for select menus in webelements.
    however...if you're feeling ambitious and or this is a definite requirement for your project...custom functions are open source so you could write an on change javascript function within the WESelect custom function that will find the new value and compare it against your certain items array of values.
    out of curiosity, what is your project's particular need to have an alert for a select menu based on what the end user selects? if this comes up more often or there's a good use case perhaps this could be built into a future version.
    jw

  • Reader v11 will not open in Windows Explorer (or browser) when clicking a PDF file; just a flash on the screen.

    Reader v11 will not open in Windows Explorer (or browser) when clicking a PDF file; just a flash on the screen. I can open Reader from Programs then open the file. I'm using a laptop upgraded to Windows 7

    I do no understand "flash on the screen"; could it be http://support.microsoft.com/kb/2716529 ?

  • I can only open 1 page of safari and when I try to open another by the   key it goes to the main page of apps

    I can only open 1 page of safari and when I try to open another by the   key it goes to the main page of apps

    Try force closing the Camera app, followed by resetting your phone.  Double=tap the home button, locate Camera in the list at the bottom, tap and hold it until it wiggles, tap to close it, tap the home button.  Now reset your phone by holding the on/off and home buttons at the same time until you see the Apple logo, then release.

  • I get an error message when trying to download apps from the app store.  "safari can not open the page because the address is invalid".  Please help!!

    i get an error message when trying to download apps from the app store.  "Safari can not oprn the page because the address is invalid"

    You can't use Safari to download iPad apps. Only use iTunes/App Store.
     Cheers, Tom

  • I cannot log onto the App Store, the page appears when I call it from the dock or the Apple menu. I can call the log-in box from the menu bar, but on signing in the spinning icon just keeps spinning,(not the beachball). Any suggestions? Using 10.6.7 and u

    I cannot log onto the App Store, the page appears when I call it from the dock or the Apple menu and I can call the log-in box from the menu bar, but on signing in the spinning icon just keeps spinning,(not the beachball).  Using 10.6.7 and up-to-date on all software. Any suggestions?

    Could be a third party app preventing you from being able to login.
    Mac App Store: Sign in sheet does not appear, or does not accept typed text
    If it's not a third party issue, follow the instructions here.
    Quit the MAS if it's open.
    Open a Finder window. Select your Home folder in the Sidebar on the left then open the Library folder then the Caches folder.
    Move the com.apple.appstore and the com.apple.storeagent files from the Caches folder to the Trash
    From the same Library folder open the Preferences folder.
    Move these files Preferences folder to the Trash: com.apple.appstore.plist and com.apple.storeagent.plist
    Same Library folder open the Cookies folder. Move the com.apple.appstore.plist file from the Cookies folder to the Trash.
    Relaunch the MAS.

  • I have just updated to 10.7.3 and safari always reloads previous pages I have been on every time on open it, my home page is set to google yet it always reloads from the history, how do I stop this

    I have just updated to 10.7.3 and safari always reloads previous pages I have been on every time on open it, my home page is set to google yet it always reloads from the history, how do I stop this

    There is a setting in the System Preferences for this as well that may be causing it. Go to System Preferences>General>Restore windows when quitting and reopening apps - at the bottom of the window under Number of Recent items. Remove the checkmark from that setting.
    Also - if you close all of your windows when you are done with Safari - it should open to your home page.

  • When i login to my mac, it opens iTunes, Skype and AIM. I've tried deleting these from the login items, but they are not on the list.  Can anyone help?

    When i login to my mac, it opens iTunes, Skype and AIM. I've tried deleting these from the login items, but they are not on the list.  Can anyone help?

    babowa wrote:
    If you do not lock that folder immediately after deleting all the contents, it will simply populate again (Resume - a "feature" in Lion). You do that by doing a Get Info (highlight folder and press Command + I keys), unlock the lock at the bottom, enter your admin password, then check the box to lock the folder. lock the lock and you're done.
    Yes, that is correct. The alternative is to quit all applications prior to logging out. Lion will then have a chance to remove the saved states.
    babowa also wrote:
    And, for the OP:
    It has also been a regular feature of Mac OS to automatically open any window that was open at shutdown. To avoit that behavior, simply close any Finder windows and  properly quit applications by closing their window and using Command + Q (or File >Quit).
    This was true only for the Finder. Prior to Lion, no other apps would launch unless they were included in the Login Items for the account. And the OS would not restore windows for other apps.
    A very small number of apps (TextWrangler is an example) implemented this capability prior to Lion. They could restore previously opened windows. But that is an application feature, and can be controlled by the application's preferences. Lion implements it at the system level, and users have virtually no control on a per application basis.

  • The problem i am having is when i go to open a file from the menu bar that as "FILE" is blackcolor

    the problem i am having is when i go to open a file from the menu bar that as "FILE" is all black in color and i cant see what i'm picking how do i change that so i can see what i'm picking

    Is that Photoshop?  Depending on the version you could try to change the Color Theme (Edit | Preferences | General | Appearance).
    If that does not help, you may have a better chance to get a useful answer if you ask in the Photoshop or Photoshop Elements forum.

  • When I try opening iPhoto on my iMac (OSX 10.9.2) it says I must first update the application; when I try doing so from the App store, it says there are no updates available. I have not renamed or moved iPhoto which was preinstalled. How to solve?

    When I try opening iPhoto on my iMac (OSX 10.9.2) it says I must first download the update; when I try doing so from the App store, it says there are no updates available.  Stuck in a classis Catch-22 - any ideas how I might solve the problem?

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • I can open a new browser window, but not a new tab, neither by clicking the plus or selecting it from the menu. I have fully updated firefox and also restarted. what's going on?

    I can open a new browser window, but not a new tab, neither by clicking the plus or selecting it from the menu. I have fully updated firefox and also restarted. what's going on?

    I have the same problem with the right click and do not have the ask toolbar installed on my system?

  • HT1937 Dear the new update iOS 7.0.4 is not opening some pages in safari. Tray to find out what's the problem. Thanks

    Dear the new update iOS 7.0.4 is not opening some pages in safari. Tray to find out what's the problem. Thanks

    There are billions of web pages. Any clue as to which ones are not opening?

  • When I'm using Safari, acasionally the menu bar just disappears. I'm running the latest version of Lion and the latest version of Safari. This is not a full screen app problem. I have multiple windows open. This happens all the time! Firefox is fine! ???

    When I'm using Safari, ocasionally the menu bar just disappears. I'm running the latest version of Lion and the latest version of Safari. This is not a full screen app problem. I have multiple windows open. This happens all the time! Firefox is fine! What the ****? Please help!

    Right, like I'm trying to say, THERE IS NO SAFARI MENU bar. Example: I have multiple applications open, I click on a Photoshop window, the correct menu or title bar or whatever changes. Every other application window I click on brings up the correct "whatever" bar. If I click on the desktop, the "Finder Bar" shows up.
    Everythiing else, BUT SAFARI, works the same way since OS X came out.  This is ridiculous.
    I'm getting the vibe that Apple is trying to get rid of the finder.... this is the way wrong direction.

Maybe you are looking for