My Flex 3 application uses a custom cursor and has to show a customized context menu when the user performs a right cl开发者_如何学JAVAick. The problem is the customized menu is shown only when the default arrow cursor is shown. When I change it to the custom cursor, the standard context menu appears instead of the customized one.
Is there a way to have both custom cursor and customized context menu in a flash application?
This is a known bug: http://bugs.adobe.com/jira/browse/SDK-26552
The customized context menu will appear as long as the custom cursor doesn't cover mouse's hot spot. In other words, the graphic for the custom cursor should be displayed at 1 pixel offset (at least) from (0, 0) point of the original mouse pointer.
Do not use CursorManager for showing the custom cursor. Hide the default mouse pointer and draw a cursor manually instead. I've posted detailed steps in this response.
精彩评论