Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6583553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:25:27+00:00 2026-05-25T16:25:27+00:00

is it possible to close a contextMenu (or hide it) from ActionScript 3? I

  • 0

is it possible to close a contextMenu (or hide it) from ActionScript 3?

I need to run an eventlistener and once the right Mousebutton is pressed something happens.

myContextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, menuSelectHandler);
function menuSelectHandler(e:ContextMenuEvent):void{
    /**
     * close the context menu and do something
     */
}

Either do not even show the context menu or close it.

Any idea how I can do this?


I have tried:

dispatchEvent(new ContextMenuEvent(ContextMenuEvent.MENU_ITEM_SELECT));

But it’s not launching my eventListener I placed on the first Menu item.
Any idea how to dispatch the event that is launched, when an item in the ContextMenu is choosen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:25:27+00:00Added an answer on May 25, 2026 at 4:25 pm

    You can’t close, hide or disable the right click in Flash Player, as much, you can hide some of the options.

    But there’s a trick, you can use JS to capture the right click and simulate your own right click inside your Flash app using ExternalInterface.

    You can see some examples of this here:
    http://www.lordofduct.com/blog/?p=318
    http://www.uza.lt/2007/08/19/solved-right-click-in-as3/
    http://blog.another-d-mention.ro/programming/right-click-and-custom-context-menu-in-flash-flex/

    The problem with this is the browser compatility, and also you need to change the wmode (which has more problems in some situations, you can search about it).
    Here are some stats about compatibility:
    http://code.google.com/p/custom-context-menu/wiki/BrowserSupport

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to use something like an vim-close/exit-Event to execute some last commands
Is it possible to close opened window from within? For example i have opened
Is it possible to close an InfoPath form programmatically? I know that it can
Is it possible to close parent window in Firefox 2.0 using JavaScript. I have
Is it possible somehow to close StreamReader after calling ReadToEnd method in construction like
Possible Duplicate: Cross-thread operation not valid I am trying to close the base of
Is it possible to get list after Session.Close as below? var bundles = session.Linq<Bundle>();
Is it possible to clone only one branch (or from a given commit) in
Possible Duplicate: close mysql connection important? How important is it close an mysql connection
Possible Duplicate: Close and Dispose - which to call? Hi, After reading some web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.