Detection of a paste event originated from the default ContextMenu in a flash TextField
Textfields currently do not dispatch paste events. When the user is using keyboard shortcuts to paste, there'开发者_Go百科s a way to workaround that shortcoming by listening to various keyboard events in the textfield.
Is there a way to detect the paste event when it is originated from a click on the ContextMenu?
When you choose an item in a ContextMenu
, the chosen ContextMenuItem
dispatches a menuItemSelect event. Use that.
Write this :
this.stage.addEventListener( Event.PASTE, handlePaste );
and then when you click on "paste" in the ContextMenu of flash player, the handlePaste
is called
精彩评论