Processing
 

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

01/10/2010 14:15#1

fusion

Member

Joined at: 9 months ago

Post: 3

Thank: 0

Thanked: 0

Textfields currently do not dispatch paste events. When the user is using keyboard shortcuts to paste, there'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?

01/10/2010 14:26Top#2

Robusto

Member

Joined at: 10 months ago

Post: 102

Thank: 0

Thanked: 0

When you choose an item in a ContextMenu, the chosen ContextMenuItem dispatches a menuItemSelect event. Use that.

25/03/2016 10:09Top#3

Shawn

Member

Joined at: 10 months ago

Post: 53

Thank: 0

Thanked: 0

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

Similar articles

Open a folder in finder/explorer from a webpage?

5 years ago - Reply: 2 - Views: 80

How do I escape a reserved word in Actionscript?

5 years ago - Reply: 2 - Views: 198

Save PPS/PPT files as SWF using C#

5 years ago - Reply: 2 - Views: 171

Ways of making a graphic/visual novel in flash

6 years ago - Reply: 3 - Views: 114

Use PhoneGap + HTML5 and an Embedded Flash Movie

5 years ago - Reply: 2 - Views: 96

View word docs and PDF in browser?

5 years ago - Reply: 2 - Views: 51

ActionScript 3 Read JPEG quality

7 years ago - Reply: 2 - Views: 59

Export/Test Movie Issues

5 years ago - Reply: 3 - Views: 38

Flash always on top in Android browser workaround?

5 years ago - Reply: 2 - Views: 149

Sending Json Form from Flash AS3

5 years ago - Reply: 2 - Views: 29

parsing a swf/fla (using php?)

6 years ago - Reply: 2 - Views: 44

Getting high FPS on Flash/AIR games for mobile?

4 years ago - Reply: 2 - Views: 58

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re