ActionScript 3 paste image from clipboard

Is it possible to paste image from clipboard using ActionScript 3 and Flash Player 11?
Need web solution only, not AIR.
Use case:
- User opens image some in some native image editor.
- Selects part of image and clicks Ctrl+C (Command+C on Mac). Now part of image is in clipboard.
- User open web application that is running in Flash Player
- User inputs image by clicking Ctrl+V (Command+V on Mac) or using context Menu->Paste.
I browsed the docs for Clipboard at: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/Clipboard .html
The only format that seems reasonable would be Clipboard.getData(BITMAP_FORMAT) on paste events. This seems to be supported by AIR only.
Are there any ways to implement the given use case with Flash Player?
Thanks!
P.S.: There is some support of paste events in HTML in Chrome and Firefox, but Internet Explorer 10 and Apple Saffari 6 seems still have issues with pure-HTML approach.
Cheers,
Ignat.

This seems to be supported by AIR only.
What gives you the impression?
AIR-only functions are marked with a fancy AIR logo
(like the first one in this list: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/images/sprite-index.png )
and getData doesn`t have it, so it should work without problems in the "normal" Flash Player if you follow the recepy:
Note for Flash Player applications: In Flash Player 10, a paste operation from the clipboard first requires a user event (such as a keyboard shortcut for the Paste command or a mouse click on the Paste command in a context menu). Clipboard.getData() will return the contents of the clipboard only if the InteractiveObject has received and is acting on a paste event. Calling Clipboard.getData() under any other circumstances will be unsuccessful.

Similar Messages

  • Paste image from clipboard works in Chrome but not in Firefox

    Hi there,
    I would like to know a bit more about the technical reasons why image pasting from clipboard works on Chrome but not Firefox.
    Steps to reproduce:
    1. Open the text editor on github.com, e.g. by commenting on an issue
    2. Copy an image to clipboard
    3. Put the mouse cursor into the text editor area
    4. Use CTRL+V to paste the image into the text editor
    On Chrome, the image is pasted and automatically uploaded on Github. On Firefox nothing happens.
    Can someone please shed light on this lacking feature?
    I would so much love to see support for this on Firefox as it is a very convenient functionality.
    Thank you!

    The best is to try it yourself I guess.
    Go to Github and try pasting an image into the compose editor.
    The editor definitely supports image pastings. They work directly in Chrome(ium).
    Thus I am wondering why Firefox does not support direct pasting from clipboard into the editor.
    See the attached screenshot regarding the editor I am talking about.

  • Copy/Paste Image from Clipboard - still no support for transparency?

    I just tried to load an Image from the Clipboard by using DataFlavor.imageFlavor. Everything works well if the clipboard-image doesn´t use any transparency. When loading an image with alpha-channel (png or gif), the transparency occurs as black pixels. Here is the code snippet:
    Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();;
    Transferable t = clip.getContents(null);
    BufferedImage img = (BufferedImage) t.getTransferData(DataFlavor.imageFlavor);img.getType allways returns TYPE_INT_RGB, even if the image contains alpha-data.
    According to this Bug-Report
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4720930]
    this should have bin fixed in 1.4.2, if i´m not wrong?
    Can anyone confirm this problem, and is there any workaround? The one described in the bug-report doesn´t work for me, since clipboard-images in my case don´t match DataFlavor.javaFileListFlavor.

    The best is to try it yourself I guess.
    Go to Github and try pasting an image into the compose editor.
    The editor definitely supports image pastings. They work directly in Chrome(ium).
    Thus I am wondering why Firefox does not support direct pasting from clipboard into the editor.
    See the attached screenshot regarding the editor I am talking about.

  • Paste image from clipboard into image item in Forms10

    Hi all!
    procedure PASTE_REGION work in Forms6 for image item, but i can't paste in Forms10.
    This function is no longer available?
    Valeriy

    Scripting or coding doesn't work with extending the Silverlight webpart. The source code of the Silverlight webpart isn't available by Microsoft. So you can't modify the code of the Silverlight webpart.
    Also it's not supported by Microsoft to modify the Silverlight webpart and it maybe causes trouble with upcoming updates on the webpart as well.
    "Please don't shoot the messenger ;-)"
    Andreas Baumgarten | H&D International Group

  • I used to be able to copy and paste images from the internet into keynote slides and pages. Now when I copy and paste all I get is an empty  box. My iskysoft iTube studio has also stopped downloading videos. Is there an extension I need to enable?

    I used to be able to copy and paste images from the internet into keynote slides and pages. Now when I copy and paste all I get is an empty  box. My iskysoft iTube studio has also stopped downloading videos. Is there an extension I need to enable? Any ideas

    Try dragging the image to the desktop, then drag the image to the slide you want it on

  • Copy and paste image from IE to Illustrator

    Dear Illustrator users,
    I need to copy and paste images from IE10 or IE11 (Internet Explorer) to Illustrator (CS6, CC).
    I right-click image, choose "copy" in Internet Explorer
    now I can paste it to mspaint, word, photoshop, etc. It works fine..
    but when I try to paste image to Illustrator, it pastes url link instead of image.
    I know this problem comes with IE10. When I downgrade to IE9, it start to work fine.
    Any suggestion?
    Kind Regards,
    Jarda

    Hi Jacob,
    Thank you for a quick answer. Your suggestion is correct, but saving image to a file is an additional step.
    Since I do this task "thousands a day", this is unacceptable
    Any other suggestion?
    Regards,
    Jarda

  • I'd like to save to file/database image from clipboard

    Hi, I've got following problem.
    In my swing application I would like to pase image from clipboard (f.ex. copied from msword). I use following code to do that:
    TransferHandler handler=jLabel.getTransferHandler();
    handler.importData(jLabel,clipData);
    Then I want to save image to database.
    I know it should look like this:
    ImageIO.write(RenderedImage im, String formatName, OutputStream output);
    But how to transform image from clipboard or graphics from jLabel1.getGraphics into RenderedImage ???
    thanx in advance !

    Starting with the original image I adjusted the levels (Image>Adjustments>Levels (Ctrl L) to the following settings:
    Then using the marquee tool I selected the areas not in use and filled with white:
    Till you get something like this:
    Then I used the brush tool to fill the other bits of the lines in white using these settings:
    Once you are happy with the result with a white background go to the Blending Options on your layer:
    and set the blend as below and press ok:
    This will make your layer look like its got a transparent background, then create a new transparent layer and place underneath:
    When you have done this combine the 2 layer by selecting both and then right click and merge layers:
    After these steps save as a .psd file then you can copy anything you need from this file.
    I hope this all makes sense and you get the result you want. Like I said fiddly! :-)
    End result:

  • Cut and Paste images from flash to power point

    Can you cut and paste images from flash player to power point?
    Thanks!

    Are the settings for the two Sequences completely indentical?
    -DH

  • How can i read a image from clipboard

    Hi all,
     Can you anyone help me to figure out this problem,actually i have an VI that capture screen image(similiar to print screen option in windows) & save it in a file.and now the thing is,its working in code,once if i converted that to EXE it is not reading that image from the clipboard .I have attached that VI along with this thread please check it.
    Attachments:
    Clipboard.vi ‏20 KB

    Hey,
    It seems that the Get Image from Clipboard method is not available for executables.
    The following thread gives a working example with a CIN -> http://forums.ni.com/ni/board/message?board.id=170&message.id=35987&requireLogin=False
    Christian

  • Pasting Image  from Mac clipboard to Java Based Application.

    Hi,
    I am working on "iMac 10.2.7". I need to paste an image from other
    application using "Java version 1.4.1". I am trying to retrieve the image
    from the system clipboard after it is copied from some other application. I
    am pasting the code which illustrates my requirement. It works fine on
    windows. But does not work on Mac.
    On Mac it does not cross the supported data flavor check
    (clipData.isDataFlavorSupported(DataFlavor.imageFlavor) where clipData is
    the Transferable object). It seems Mac has some InputStream instead of Image
    in the clipboard when some image is copied. I tried to read that InputStream
    using ImageIO.read(java.io.InputStream). But that is also returning null.
    Thanks
    Santanu
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.awt.datatransfer.*;
    import javax.swing.*;
    public class ClipboardTest extends JFrame implements KeyListener{
         JLabel label;
         static Toolkit kit = null;
         static Clipboard clipboard = null;
         public static void main (String arg[]) {
              kit = Toolkit.getDefaultToolkit();
              clipboard = kit.getSystemClipboard();
              JLabel l = new JLabel();
              JButton button = new JButton("Paste from clipboard");
              final ClipboardTest ct = new ClipboardTest(l);
              ct.getContentPane().add(l,BorderLayout.CENTER);
              ct.getContentPane().add(button,BorderLayout.SOUTH);
              ct.setVisible(true);
         button.addActionListener(
              new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        pasteImage(ct.label);
         button.addKeyListener(ct);
         public ClipboardTest (JLabel l) {
              label = l;
         public static void pasteImage(JComponent jComp) {
                   jComp.setTransferHandler(new ImageSelection());
                   TransferHandler handler = jComp.getTransferHandler();
                   Transferable clipData = clipboard.getContents(null);
              if (clipData != null) {
              if (clipData.isDataFlavorSupported(DataFlavor.imageFlavor)) {
                   handler.importData(jComp, clipData);
         //Key listener methods
         public void keyPressed(KeyEvent e) {
         int c = e.getKeyCode();
         if (c == 86) {
              if (e.isControlDown()) {
                   pasteImage(label);
         public void keyReleased(KeyEvent e) {}
         public void keyTyped(KeyEvent e) {}
    class ImageSelection extends TransferHandler implements Transferable {
         /* DataFlavor instance that holds imageflavor value*/
         private static final DataFlavor flavors[] = {DataFlavor.imageFlavor};
         private Image image;
         public boolean importData(JComponent comp, Transferable transferable) {
         try {
         if (transferable.isDataFlavorSupported(flavors[0])) {
         image = (Image)transferable.getTransferData(flavors[0]);
                   if (comp instanceof JLabel) {
                   ((JLabel)comp).setIcon(new ImageIcon(image));
                   comp.repaint();
                   return true;
         } catch (Exception ignored) {
              ignored.printStackTrace();
         return false;
         // Transferable Interface methods
         public Object getTransferData(DataFlavor flavor) {
         if (isDataFlavorSupported(flavor)) {
         return image;
         return null;
         public DataFlavor[] getTransferDataFlavors() {
         return flavors;
         public boolean isDataFlavorSupported(DataFlavor flavor) {
         return flavor.equals(flavors[0]);

    Here are two commercial options:
    JTwain + JSane
    http://asprise.com/product/jtwain/index.php
    Morena
    http://www.gnome.sk/Twain/jtp.html
    Haven't tested them, so don't no how good they are, nor how easy they are to use on multiple platforms.

  • Cannot copy and paste images from the web into Corel Draw

    Attempting to copy and paste a jpg image from a client's website, for use in Corel Draw... Copy appears to work fine, and pasting into other programs like Windows Paint works, but paste to CorelDraw has no result.
    I've seen where others would get the text URL but nothing happens when I hit paste.
    Drag and drop imports the text name of the image.

    Since Firefox 13, when you copy an image, Firefox places both the image data (bitmap data) and the URL of the image on the clipboard. I can see why you would get one or the other, but I can't think of why you would get nothing.
    Did this just start in Firefox 22?
    Some odd interactions have been noted between Firefox 22 and ZoneAlarm: when ''copying'' selected text in Firefox, the clipboard may end up blank a significant percentage of the time . But it sounds as though you have a different issue.
    Do you have the same issue in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: [[Troubleshoot Firefox issues using Safe Mode]].
    You can restart Firefox in Safe Mode using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode" (''not'' Reset)
    Any difference?

  • Copy and paste image from PDF to another application

    how do you copy and paste an image from PDF into another application such as Word or Excel? I know how to copy>> hover cursor over picture until it turns into a select "+" tool, select and right click to copy but when I try to paste it into another application, its loses all of its formatting. Thanks

    Not sure what you mean by formatting of a picture. You can export all images and get a files to import to word. You can also use the snapshot tool, though it captures a screen copy. If you select an image and copy, my experience has been that it will only copy to PhotoShop, but it is not something I do very much. If the image is part of the document (not markup like a stamp or such), you can use the select tool to select the image and copy it to the clipboard. Just tried it and it worked fine. If it is a stamp (like pasted in), then you can not copy it in this way, if at all.

  • Unable to paste image from Powerpoint to Adobe X Standard

    Good Morning all,
    We currently have Adobe X Standard (10.1.3) installed on a Windows 2008 R2 environment shared between a dozen users. One user is attempting to copy an image from Powerpoint 2010 into a PDF. Trying the standard ctrl+c & ctrl+v commands doesn't work. If we go to edit in Adobe the paste option is greyed out. So we tried the snipping tool to see if this works and it does, but it's very hit & miss.
    I thought that it may have something to do with the Standard version on Win 2008 so i installed it also on a stand-alone Win 7 machine. The copy & paste works absolutely fine.
    Has anyone come across this before with Adobe installed on Win 2008 R2?
    Many thanks
    Dan

    Thanks for the response David.
    I've submitted a bug request. It is strange in regards to replicating the issue but your response is appreciated
    I did contact Adobe Technical Support via the online chat and they suggested that the copy & paste function is not available under the Standard version. I did some more testing as per my previous replies and still the same thing happened.
    As a workaround we managed to use the comment > stamp > copy stamp from clipboard function. This works well and in a similar way to copy & paste.

  • How to save image from Clipboard to disk?

    Hello;
    I want to take a screen capture of the entire screen, not only the front
    panel and save it to a file. Don't care about the image format right now.
    I am able to simulate a PrintScreen key using a call to user32.dll
    "keybd_event" in Win2K, but I am stuck here. How do I get that image that is
    now in the clipboard to disk? I have searched NI's website high and low, and
    nothing yet.
    Thanks is advance,
    /JB
    LabVIEW 6.1

    I've kind of done it "programmatically".... using the "system exec.vi" I've
    started mspaint.exe... then, I paste the image and save it to disk (too bad
    the last two steps are manually done!!!)
    The limited documentation on System Exec says it has a Standard Input
    terminal... but, I haven't figured out how to programmatically send CTRL-V
    or ALT-E to the MSPAINT application as command inputs...
    Any further ideas?
    Bill
    Jimmy Brain wrote in message
    news:[email protected]..
    > Thanks Labviewguru, but those examples deal with copying text to/from
    > clipboard.
    > There was an example from a shareware program, but it does not allow
    > to save the image. The links to register it at the his website
    are
    > dead also.
    >
    > Nobody here has ever had the need to copy programmaticaly an image in
    > the clipboard and save it to disk?
    >
    > I know that IMAQ Vision can do it, but I do not have that.
    >
    > PS: I found this OCX ( http://www.simtel.net/pub/pd/57740.html ) on
    > the web that does this, but I haven't been able to get it to work from
    > inside LabVIEW. The Visual Basic example works, but I can't seem to
    > replicate the call to this OCX in LabVIEW.
    > I am mostly trying to learn on my own, that is why I want to much to
    > solve this.
    >
    > Thanks in advance for any help out there. I have become frustrated
    > with this little problem. I know someone might have an easy answer,
    > but I haven't found it yet. Thanks!!!! :-)
    > /JB
    > LabVIEW 6.1

  • Word crash with sharepoint document and copy-pasting image from paint

    Initially I've posted this to another forum but there the rec was to post it here as well.
    I have a very annoying issue occurring in specific circumstances (but unfortunately for me that is my daily work), it happens when a document is stored on a SharePoint server. When I copy-paste an image from ms paint into word, often I get the message 'word
    has encountered an error' but then I can continue, but every 5-10 times Word crashes completely.
    When the error (not the crash) occurs, there is this nothing-saying error message stated below. Think of it.. my ‘floppy disk’ is not full, I have 8 GB of ram and I’ve all the permissions I require. The virus scanner is Symantec Endpoint
    Protection.
    All systems are in a world-wide enterprise environment (>20.000 users) – So I guess from that side everything is configured OK.
    There is a problem saving the file.
    Usually this is because the disk or floppy disk is too small for the file or is full, RAM memory is low, or there is a permission problem with the drive the file is being saved to.
    If the amount of disk space for a paging file is low, save the file to another drive. If the RAM memory is low, increase available RAM. If permissions to the drive do not allow you to save to that drive, save the file to another drive or request
    permissions from the administrator to save files to the drive.
    Note   This error can also occur if the computer is running a version of antivirus software that is incompatible with the Microsoft Office or must be updated.

    Hi,
    What is the version of Word?
    Sometimes the Preview Pane in Windows File Explorer may conflict with Word, thus the error message appears. If you have enabled the Preview Pane in File Explorer, disable it to check the result. For example, in Windows 8.1, Open File Explorer, click
    View tab on the top -> Panes -> Click Preview Pane to enable or disable it.
    If the issue persists, I suggest you collect the event logs to find the cause of the crash:
    Press Win + R, type "eventvwr" in the blank box, press Enter to open Event Viewer. Browse to Windows Logs -> Application, check if there is any error about the crash.
    You can send the event logs to our email address and we can help analyze the problem:
    [email protected]
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

Maybe you are looking for

  • Black screen on startup with a mouse pointer but can't do anything???

    Hello, I've read all the posts in regards to this topic.  Nothing has worked.  I have my brothers HP laptop with Windows Vista.  I thought the Hard Drive (HD) crashed because all I had on start up was a black screen with a cursor.  When booting I am

  • HP OfficeJet Pro 8500A Plus - By passing expired Color Cartridges to print only in Black printing.

    Hi, Problem: fIt seems that this model of printer has a built in protocol which makes the printer inoperable if any of the colour cartridges are past their expiry date. Attempts to print solely in black are also being prevented because of this. Does

  • Itunes for windows will not install

    SInce Christmas, I have tried installing iTunes for my Ipod shuffle. I have NIS and I've followed some instructions I found on a thread to add itunes and ipod into my programs and "permit all"- that usually freezes the computer. I wind up sending err

  • Mail subject rewriting when sent to DL- Exchange 2010

    Hi folks, we have an Exchange 2010 and several DL. We'd like to rewrite the subject of any message sent to a specific DL to ease the filtering of such messages (seen Outlook client is limited in filtering). Any of the rules as described here don't ap

  • LCCS 1.1.1 is released!

    Hello Everyone, We present our latest LCCS SDK 1.1.1 release. Our primary goal for this release has been consolidating on big features we released in mid April as we move forward. We took special care about some user issues raised in last one month.