As an AIR app, it should definitely be much easier.  With it, you have
access to flash.desktop.Clipboard.  When flash is running in the browser,
it's subject to a lot more restrictions.  You can call System.setClipboard
to copy a string to the clipboard, but that's pretty much it.

Different browsers have different rules/methods for accessing the clipboard
from Javascript.  Here's a page on how to do it in IE, but you'll get a
security warning in more recent versions:
http://www.codehouse.com/javascript/tips/clipboard_send/

There's a config option in the more recent versions of Firefox to allow
clipboard writing from javascript:
http://www.febooti.com/support/website-help/website-javascript-copy-clipboard.html


I'm not up on how each different version treats these things.  Furthermore,
if you have to support users of Safari, Opera, or even Chrome now, you may
run into issues.

Not sure if you need it, but I ran across this article for actually creating
the snapshop in Flex using the new ImageSnapshot class:
http://dougmccune.com/blog/2007/06/11/imagesnapshot-class-in-flex-3-sdk/

On Sat, Sep 13, 2008 at 1:20 AM, Guy Morton <[EMAIL PROTECTED]> wrote:

>   Has anyone got any advice as to how one might allow a user to copy a
> graph to their clipboard (or save it as a file)?
>
> I'm sure I'm not the first person to ask this, so if there is an
> authoritative "copying data from Flex" FAQ somewhere please let me know.
>
> We'll be building this app in Flex 3. We can do server-side stuff if
> need be, but we're not running CF or Flex data services.
>
> Also, if we were able to distribute the app as an AIR app, would we
> have access to vastly better options?
>
> TIA
>
> Guy
>  
>



-- 
Jason

Reply via email to