3 Replies Latest reply on May 29, 2007 11:18 PM by Crunchy_Cat

    Get rid of that damn context menu!

    Crunchy_Cat
      I'm using flex in an embedded browser within a win32 application. I need to use my own context menu and the existing one that adobe provides has a settings option that darkens the client area and invalidates my transparency color (i.e. the mask color of custom shaped flex UI suddenly appears). How do I eliminate the adobe context menu? I tried the swRemote="swContextMenu='false'" option but it had no impact. My .swf files are used locally if that matters.
        • 1. Re: Get rid of that damn context menu!
          onlysport
          Unfortunately I do not believe you can remove the Adobe menu items at all..

          The word "Settings" is also very ambiguous when dealing with Flex Applications that actually have their own settings the developer has added..

          It would be much better if the About and Settings menu items, and all the rest of them for that matter appeared in an "Adobe => Settings" style menu, where everything was underneath the "Adobe" sub-menu..

          But, in conclusion, I do not think they can be removed.
          • 2. Re: Get rid of that damn context menu!
            JKohn99
            You can get rid of some of the flash player context menu but not all.
            Get the default context menu and call hideBuiltinItems

            var defaultMenu:ContextMenu = Application.application.contextMenu;
            defaultMenu.hideBuiltInItems();
            • 3. Re: Get rid of that damn context menu!
              Crunchy_Cat Level 1
              Thanks for your replies. I have been able to get rid of alot of menu items via Application.application.contextMenu.hideBuiltInItems() and setting menu="false" in the html starter document. 'Settings' (the most problematic menu-item) remains. Really, any 'enforced' menu option should not changed the visual state of the UI... and that's whats killing me.

              Maybe Adobe can view and respond to this issue. The only other thing I can think of is introducing a Win32 hook to hijack all mouse messages before the flex hWnd gets them and handle right-mouse-clicks from there (and keep them from going to flex). It's a horrible solution and really complicates things.