Dima Malenko
Dima Malenko

Reputation: 2835

How to determine currently processed event in ActionScript?

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

Answers (1)

Adrian Pirvulescu
Adrian Pirvulescu

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

Related Questions