Adobe AIR: Any way to use HTML, JavaScript, and ActionScript to create a Copy to Clipboard button WITHOUT using zClip? Is this even possible?

I'm not sure if this is even possible, so please bare with me.

Firstly, I have no code to really display here, since I have not been able to really make a start until I've found out my answer. I've been checking all over Stack, and all over the internet, and found numerous references that seem to hint towards Adobe AIR being able to write directly to the clipboard in some fashions, but no concrete examples on how this is accomplished.

So my question is I hope a simple one: Is there ANY way to use an HTML FORM input button, or maybe a simple URL link to Copy directly to the Windows Clipboard in Adobe AIR without the use of invisible flash files overlayed over buttons (such as zClip or zeroClipboard)?

This is for an in-house application that would run on our employees computers. The idea is to be able to have a button that when clicked would run a JavaScript function to get the values of a bunch of different form fields (name, address, etc), output them to a textarea on the page, and then have that textarea automatically copied to the clipboard to be pasted into a client file.

I completely understand why copy to clipboard functionality was completely removed from JavaScript and is almost impossible to do even now with flash in a web browser, but I was hoping by using AIR which is more of a local application, I'd be able to stick to what I know (HTML and Jscript) but achieve my goal without zClip. This wouldn't be so much of a security issue I figure because it's all in-house and would never leave an employee machine.

For those wondering, the reason I don't like zClip is because it doesn't work with tab orders, I like to use just my keyboard when entering in information and tab to my submit and copy buttons, but since the zClip overlays an invisible flash file over the actual button, when you tab over to the button, it does nothing, rendering tab functionality useless.

Sorry if this was long winded, I hope it's fully understood, and if the answer is simply "No" then I'd appreciate just telling it to me straight, and hey maybe you could point me in the direction of a better method for this application.

Cheers!

Answers


Not sure if I fully understand the question.

If you are looking to expose clipboard functionality in Air using JS take a look at the Adobe Air HTML reference - it contains a clipboard class for use with JS Air applications.


You can route JS click event into AS3 handler with ExternalInterface.addCallback(), see example. Use arguments to transfer data to be pasted. Then Clipboard.generalClipboard.setData() can paste data in text format. See example on Adobe docs.


Need Your Help

How to use a python api on iPhone?

iphone python objective-c

There is an "Unofficial Plurk API in Python".

SQLite Security in iOS

iphone objective-c ios sqlite

I am developing app, which uses sqllite db. I want to provide security to DB. Is there any ways to provide security to SQLite DB so that no one can read it by hacking device or something else.