views:

44

answers:

1

When one call Clipboard.generalClipboard.getData() in ActionScript outside of Event.PASTE processing function it fails with following message

The Clipboard.generalClipboard object may only be read while processing a flash.events.Event.PASTE event.

Even if I dispatch Event.PASTE event and call this function within event handler it still fails.

How does it determine which event is currently being processed?

+3  A: 

you need to lister for the real paste Event from the stage and not simulate it. This is a security issue so flash apps do not read your global clipboard data, only on user paste action.

Adrian Pirvulescu