[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Make the badge clickable.
commit 613b712831be9613167fd7e47a368de4b5194e94
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sun Oct 16 19:53:11 2011 -0700
Make the badge clickable.
---
swfcat.as | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/swfcat.as b/swfcat.as
index 3489bf2..e7afed1 100644
--- a/swfcat.as
+++ b/swfcat.as
@@ -330,12 +330,17 @@ package
}
}
+import flash.events.MouseEvent;
+import flash.net.navigateToURL;
+import flash.net.URLRequest;
import flash.text.TextFormat;
import flash.text.TextField;
import flash.utils.getTimer;
class Badge extends flash.display.Sprite
{
+ private const FLASHPROXY_INFO_URL:String = "https://crypto.stanford.edu/flashproxy/";
+
/* Number of proxy pairs currently connected. */
private var num_proxy_pairs:int = 0;
/* Number of proxy pairs ever connected. */
@@ -385,6 +390,8 @@ class Badge extends flash.display.Sprite
/* Update the client counter on badge. */
update_client_count();
+
+ addEventListener(MouseEvent.CLICK, mouse_clicked);
}
public function proxy_begin():void
@@ -413,6 +420,15 @@ class Badge extends flash.display.Sprite
for(var i:Number = 0; i < num_proxy_pairs; i++)
cur_client_count_tf.appendText(".");
}
+
+ /* Show a web page with detailed information when the badge is clicked. */
+ private function mouse_clicked(e:MouseEvent):void
+ {
+ try {
+ navigateToURL(new URLRequest(FLASHPROXY_INFO_URL));
+ } catch (err:Error) {
+ }
+ }
}
class RateLimit
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits