I have worked around this issue by providing a "open menu" icon wherever I want users to be able to view a context menu and then training my users to click on that icon in order to get the menu. In the click handler you can then create a mx.controls.Menu that has the desired look and feel. Not ideal, but if your users can get used to it...

hth
Scott

Derek Vadneau wrote:

You can't stylize the ContextMenu because it isn't in Flash. The contextmenu is opened by the player and is a system-level control. It's similar to the contextmenu in the browser or in other applications.

You also can't override the right-click. The Flash Player will always display the contextmenu on a right-click.

The only ways around this are offline tools, such as AIR, SWF Studio, etc. There is an ongoing effort to get by this here: http://code.google.com/p/custom-context-menu/ <http://code.google.com/p/custom-context-menu/>

However, it does depend on browser-specific code and, as such, is subject to browser version limitations. It worked for me at one point, but I just tried it and it doesn't seem to work now.


On 9/7/07, *sk_acura* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi All,

    I am trying to have a Custom Context Menu on the Items i have in my
    Canvas.

    I am able to get the ContextMenu and desired functionality by
    assigning the contextMenu when ever i add an Item to the Canvas .How
    ever the look and feel is same as the default one..

    How can i change it .I want to use a StyleSheet and change the look
    and feel and i don't see a style property in either ContextMenu or in
    ContextMenuItem.

    Or i have to disable the ContextMenu and add an EventHandler for the
    Right Click and open a PopUp !!! ( I guess by this way i have complete
    control over how i am going to display each MenuItem. (An Image and
    Label combination)..

    Thanks
    Kumar




--

Derek Vadneau

Reply via email to