2

I'm using this code in a Flex 4.6 mobile project for ipad. It works in the emulator, but on the ipad device, nothing is set. Any suggestions? Can you copy text to the clipboard on iOs?

System.setClipboard('some text');

stevemcl
  • 367
  • 1
  • 3
  • 11
  • Testing in the emulator has very little relation to actually testing on the device. My guess is that clipboard copying is disallowed; but it's just a guess. – JeffryHouser Sep 07 '12 at 22:13

2 Answers2

0

You should use flash.desktop.Clipboard. For example flexspaces AirClipboardUICommand class

Ivan Dyachenko
  • 1,348
  • 9
  • 16
  • I'm not convinced the code sample you link to is the least bit educational. However, here are the docs for the Clipboard class: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/Clipboard.html and some docs on Copy and Paste in w/ the clip board class: http://help.adobe.com/en_US/as3/dev/WS2F6A31B9-1AE6-4b23-9C12-57A33F4F0516.html – JeffryHouser Sep 11 '12 at 20:17
0

if you use the StageTextInputSkin skin for the TextInput you will get native copy and paste behaivor and if you need something that works like a Label, you can use the same textinput only that u need to extend the StageTextInputSkin class to remove the borders and change the textinput to none editable, hope that help

goseta
  • 770
  • 1
  • 7
  • 26