TextClipboard.getContents only works on AIR
I have got two projects based on one library project, one is an AIR application, the other one is a Web application, when I tried to access System Clipboard using TextClipboard.getContents(), AIR version works fine, but web version got:
SecurityError: Error #2179: The Clipboard.generalClipboard object may only be read while processing a flash.events.Event.PASTE event. at flash.desktop::Clipboard/getObjectReference() at flash.desktop::Clipboard/convertNativeFormat() at flash.desktop::Clipboard/getOriginal() at flash.desktop::Clipboard/getData() at flashx.textLayout.edit::TextClipboard$/http://ns.adobe.com/textLayout/internal/2008::getTextOnClipboardForFormat()at flashx.textLayout.edit::TextClipboard$/getContents() ...
I have used TextClipboard.setContents() to write the System Clipboard, works perfectly fine on both versions. Just wondering if this is how TextClipboard suppose to work? any suggested work around for this? Thanks in advance.
