Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

93 lines (71 sloc) 3.291 kB

Clippy - Helping you copy text to your clipboard

Clippy is a very simple Flash widget that makes it possible to place arbitrary text onto the client's clipboard. Here is what Clippy looks like on GitHub:

Clippy in action

All texts on Clippy are set via params so it is suitable for I18n.

Here is a sample Rails (Ruby) helper that can be used to place Clippy on a page:

def clippy(text, copytext, copiedtext, bgcolor='#FFFFFF')
  copytext ||= "copy to the clipboard"
  copiedtext ||= "copied!"
  html = <<-EOF
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
            id="clippy" >
    <param name="movie" value="/flash/clippy.swf"/>
    <param name="allowScriptAccess" value="always" />
    <param name="quality" value="high" />
    <param name="scale" value="noscale" />
    <param NAME="FlashVars" value="text=#{text}&copytext=#{copytext}&copiedtext=#{copiedtext}">
    <param name="bgcolor" value="#{bgcolor}">
    <embed src="/flash/clippy.swf"

The method sets via Flashvars three parameters:

  • text: The text to be copied to the clipboard
  • copytext: The text to appear next to the icon before it is clicked
  • copiedtext: The text to show once the user clicks on the icon

Installation (Pre-Built SWF)

If you want to use Clippy unmodified, just copy build/clippy.swf to your public directory or wherever your static assets can be found.

Installation (Compiling)

In order to compile Clippy from source, you need to install the following:

The haXe code is in clippy.hx, the button images are in assets, and the compiler config is in compile.hxml. Make sure you look at all of these to see where and what you'll need to modify. To compile everything into a final SWF, run the following from Clippy's root directory:

swfmill simple library.xml library.swf && haxe compile.hxml

If that is successful, copy build/clippy.swf to your public directory or wherever your static assets can be found.


If you'd like to hack on Clippy, start by forking my repo on GitHub:

The best way to get your changes merged back into core is as follows:

  1. Clone down your fork
  2. Create a topic branch to contain your change
  3. Hack away
  4. If you are adding new functionality, document it in
  5. If necessary, rebase your commits into logical chunks, without errors
  6. Push the branch up to GitHub
  7. Send me (mojombo) a pull request for your branch


MIT License (see LICENSE file)

Jump to Line
Something went wrong with that request. Please try again.