Reputation: 2835
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?
Upvotes: 0
Views: 242
Reputation: 4340
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.
Upvotes: 3