Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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