Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save psyked/361140 to your computer and use it in GitHub Desktop.
Save psyked/361140 to your computer and use it in GitHub Desktop.
import couk.psyked.air.printscreen.events.PrintScreenMonitorEvent;
import couk.psyked.air.printscreen.PrintScreenMonitor;
private var monitor:PrintScreenMonitor
private function init():void {
monitor = new PrintScreenMonitor(100);
monitor.addEventListener(PrintScreenMonitorEvent.ADD_SCREENSHOT,
updateImage);
monitor.addEventListener(PrintScreenMonitorEvent.CHANGE_SCREENSHOT,
updateImage);
monitor.addEventListener(PrintScreenMonitorEvent.REMOVE_SCREENSHOT,
removeImage);
monitor.watch();
}
private function updateImage(e:PrintScreenMonitorEvent):void {
image.data = e.bitmap;
}
private function removeImage(e:PrintScreenMonitorEvent):void {
image.data = "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment