FORUMS: list search recent posts

Copy and paste text within AIR app

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Graham Quince
Copy and paste text within AIR app
on Apr 28, 2009 at 7:34:20 am

Hi guys

I've got a nice little flash exe use frequently, and started playing around with AIR and turned the exe into an AIR file. The main function of the exe was to be able to CTRL-V text into an input box, but AIR seems to block it. I've found various tutorials but can't get them to work. Help.

Graham

PS The flash exe is in AS2

http://www.YouTube.com/ShiveringCactus - Free FX for amateur films


Return to posts index

Clint Milner
Re: Copy and paste text within AIR app
on Apr 28, 2009 at 11:21:48 am

I'm a beginner at AIR stuff, but I thought that AIR apps could only be written in AS3.

I may be wrong, but that just popped into my head as I read this post.

You might try Lee Brimlows forum as well over at http://www.gotoandlearnforum.com/ because there's a dedicated AIR Forum.

Good Luck,
Clint

Adobe CS4 Master Suite
Vista Ultimate 64 SP1
Intel Core i7 920 @ 3.60GHz
12 GB DDR3 RAM
NVidia Quadro FX 3700
Matrox RT.X2 LE Capture Card
4 TB RAID 5


Return to posts index

Pieter Helsen
Re: Copy and paste text within AIR app
on Apr 28, 2009 at 3:19:37 pm

Yup, AIR apps only support AS3. To access the clipboard in an AIR app, you can use the Clipboard class.

To access the system clipboard, you would do something like this:

Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT);

Or... To send a text to the clipboard:
Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT,"My text to clipboard");

You can also send images to the clipboard. In this case you would use ClipboardFormats.BITMAP_FORMAT. There's a few more but I don't know them by heart.

Kind regards,
Pieter

General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.


Return to posts index


Graham Quince
Re: Copy and paste text within AIR app
on Apr 30, 2009 at 8:17:49 am

Ah, I think it's because I got all the other functions running fine in AIR, that I thought there would be some way to fix this.

Thanks Clint and Pieter,

Graham

http://www.YouTube.com/ShiveringCactus - Free FX for amateur films


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]