Skip to content

Instantly share code, notes, and snippets.

@haraldmartin
Created February 16, 2009 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haraldmartin/65322 to your computer and use it in GitHub Desktop.
Save haraldmartin/65322 to your computer and use it in GitHub Desktop.
import flash.external.*;
var text:String;
button.onRelease = function() {
text = String(ExternalInterface.call("Clipboard.textToCopy", Key.isDown(KEY.ALT))) || ' ';
System.setClipboard(text);
trace('copied [' + text + ']');
}
button.onRollOver = function() {
ExternalInterface.call('Clipboard.onFlashButtonOver');
}
button.onRollOut = function() {
ExternalInterface.call('Clipboard.onFlashButtonOut');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment