Reputation: 2693
Is there a way to copy an image into an Air app through the context menu (right-click menu) or at least to detect if there is an image within the clipboard?
Thanks Uli
Upvotes: 1
Views: 309
Reputation: 76850
One strategy would be to check the clipboard on the ACTIVATE event and do something like enable/disable a context menu item based on the result:
private function checkForImageData(e:Event):void {
myContextMenu.clipboardItems.paste = Clipboard.generalClipboard.hasFormat(ClipboardFormats.BITMAP_FORMAT);
}
addEventListener(Event.ACTIVATE, checkForImageData);
Upvotes: 1