Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Add copied callback
Browse files Browse the repository at this point in the history
After text is copied, clippy will attempt to callback clippyCopiedCallback (javascript function) passing in the clippy id.
  • Loading branch information
kneath committed Dec 23, 2009
1 parent 835d87c commit 6752264
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Clippy.hx
Expand Up @@ -43,6 +43,7 @@ class Clippy {


button.addEventListener(MouseEvent.MOUSE_UP, function(e:MouseEvent) { button.addEventListener(MouseEvent.MOUSE_UP, function(e:MouseEvent) {
flash.system.System.setClipboard(ExternalInterface.call("(function(id){if(document.getElementById(id)){ return(document.getElementById(id).innerHTML) }else{alert('WARN: ' + id + ' Not found ');}})",id)); flash.system.System.setClipboard(ExternalInterface.call("(function(id){if(document.getElementById(id)){ return(document.getElementById(id).innerHTML) }else{alert('WARN: ' + id + ' Not found ');}})",id));
ExternalInterface.call("(function(id){if(clippyCopiedCallback){ clippyCopiedCallback(id)}})", id);
label.text = copied; label.text = copied;
label.setTextFormat(format); label.setTextFormat(format);
}); });
Expand Down

0 comments on commit 6752264

Please sign in to comment.