0

"Copy" functionality throws error (Flash Player 10)

there are couple of places around the YOS dev scene that use a "Copy" functionality. this appears in the yap editor, permissions screen (Consumer Key: Copy, Shared Secret: Copy) and the yql test console (Copy URL) - when i click on these buttons, i see the following error thrown by my flash debug player (v10):

Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.
at flash.system::System$/setClipboard()
at Clipboard/setClipboard()[/Users/lem/Documents/FlexAppStudio/clipboard/Clipboard.as:52]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at <anonymous>()


with the latest version of the flash player, setting clipboard data must called through actionscript that originates from user interaction - this includes actions such as clicking the mouse or using the keyboard:
http://www.adobe.com/devnet/flashplayer/ar...int.html#head31

you can look at the yui solution they used for their uploader widget to get an idea for a work-around:
http://developer.yahoo.com/yui/uploader/

by
4 Replies
  • QUOTE (LJS @ Oct 29 2008, 11:55 AM) <{POST_SNAPBACK}>
    there are couple of places around the YOS dev scene that use a "Copy" functionality. this appears in the yap editor, permissions screen (Consumer Key: Copy, Shared Secret: Copy) and the yql test console (Copy URL) - when i click on these buttons, i see the following error thrown by my flash debug player (v10):

    Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.
    at flash.system::System$/setClipboard()
    at Clipboard/setClipboard()[/Users/lem/Documents/FlexAppStudio/clipboard/Clipboard.as:52]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at flash.external::ExternalInterface$/_callIn()
    at <anonymous>()


    with the latest version of the flash player, setting clipboard data must called through actionscript that originates from user interaction - this includes actions such as clicking the mouse or using the keyboard:
    http://www.adobe.com/devnet/flashplayer/ar...int.html#head31

    you can look at the yui solution they used for their uploader widget to get an idea for a work-around:
    http://developer.yahoo.com/yui/uploader/


    Thanks, we're aware of it and will get a fix out soon. In the mean time you can use the old-school copy method, ctrl-c.

    :)(*shakes fist at adobe*)
    0
  • QUOTE (basictheory @ Oct 31 2008, 11:05 AM) <{POST_SNAPBACK}>
    In the mean time you can use the old-school copy method, ctrl-c.


    cool, as long you know. "manual" copying works for the yql test console since its just a html textarea, but for the consumer key and shared secret in the YAP editor, the input fields are 'disabled' so you cant select or copy - changing it to 'readonly' would be better (at least for FX 3.0.3, IE 7 on a PC)
    0
  • Hey guys,

    Here is a free JavaScript / Flash library that offers copy-to-clipboard functionality in your web pages, and works perfectly with Flash Player 10.

    http://code.google.com/p/zeroclipboard/

    Enjoy!
    0
  • When trying to open "ZeroClipboard.fla" I get an error: "Unexpected File Format". No idea if it's the file its self or the fact that I'm using CS3 to open it. ?
    0
This forum is locked.

Recent Posts

in Y!OS Suggestions