Heidi
Heidi

Reputation: 51

Can't get Clippy to copy to clipboard, followed installation instructions

I followed the instructions for installing clippy with ruby on rails from here https://github.com/mojombo/clippy I placed the swf file in the public folder and all the assets as well. I created a Clippy Helper. I installed Haxe and swfmil and complied everything. What's showing up on the page is just a white box that I cannot click. If I inspect it, it looks correct in the code, but when I click it nothing happens and no text gets copied. Any ideas?

Upvotes: 4

Views: 1188

Answers (2)

Piotr Brudny
Piotr Brudny

Reputation: 656

I had the same problem. I changed path to clippy.swf and it works fine. Make sure you have a correct path!

That is how my clippy helper looks like when clippy.swf is directly in /public

def clippy(text, bgcolor='#FFFFFF')
  html = <<-EOF
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
        width="110"
        height="14"
        id="clippy" >
<param name="movie" value="/clippy.swf"/>
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param NAME="FlashVars" value="text=#{text}">
<param name="bgcolor" value="#{bgcolor}">
<embed src="/clippy.swf"
       width="110"
       height="14"
       name="clippy"
       quality="high"
       allowScriptAccess="always"
       type="application/x-shockwave-flash"
       pluginspage="http://www.macromedia.com/go/getflashplayer"
       FlashVars="text=#{text}"
       bgcolor="#{bgcolor}"
/>
</object>
 EOF
end

Upvotes: 1

lukiffer
lukiffer

Reputation: 11313

This was broken as of Flash 10 - clipboard access is granted as long as it is originated from a user action.

Here's an alternate solution that places the flash object over the DOM target: http://code.google.com/p/zeroclipboard/

Upvotes: 0

Related Questions