Clipboard Access

13 views
Skip to first unread message

Pareek

unread,
Aug 13, 2008, 3:05:03 AM8/13/08
to Flex India Community
Greetings Everybody,
I am very new to programming world and learning flex...

I want to access the data on clipboard ...
In Flex through System.setClipboard() we can place data on
clipboard..but instead of writing on the clipboard ,I want to read
data from clipboard....

Well..I came across some video tutorials for performing such operation
in AIR ..but no resources for using this in flex. (http://
movielibrary.lynda.com/html/modPage.asp?ID=596&cid=596) .....

Will someone throw some light on this..so that I can move ahead in my
learning process...

Thanks
Regards

Pradeek

unread,
Aug 13, 2008, 4:37:53 AM8/13/08
to Flex India Community
Try this...
import flash.desktop.ClipboardFormats;
var txt:String =
Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT);
This should work

Pradeek

unread,
Aug 13, 2008, 4:19:17 AM8/13/08
to Flex India Community
Use the Clipboard's getData method :

import flash.desktop.ClipboardFormats;
var txt:String =
Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT);

This should work.

On Aug 13, 12:05 pm, Pareek <manish.dee...@gmail.com> wrote:

swaps

unread,
Aug 13, 2008, 4:36:38 AM8/13/08
to Flex India Community
Hi Pareek,

Due to security issue we cannot access clipboard data, but AIR's
secuity sandbox allow clipboard access.

Work around for this is to use JavaScript which will save/retrieve
data from clipboard.


Regards
Swapnil
Reply all
Reply to author
Forward
0 new messages