开发者

Detection of a paste event originated from the default ContextMenu in a flash TextField

开发者 https://www.devze.com 2023-01-18 14:54 出处:网络
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 even

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

0

精彩评论

暂无评论...
验证码 换一张
取 消