 
             if (this.loaderInfo.parameters["debug"])
                 addChild(output_text);
-            else {
-                addChild(new BadgeImage());
-                /* Tried unsuccessfully to add counter to badge. */
-                /* For now, need two addChilds :( */
-                addChild(tot_client_count_tf);
-                addChild(cur_client_count_tf);
-            }
+            else
+                addChild(badge);
 
             fac_addr = get_param_addr("facilitator", DEFAULT_FACILITATOR_ADDR);
             if (!fac_addr) {

        /* TextField for debug output. */
        private var output_text:TextField;

        private var fac_addr:Object;

        /* Number of proxy pairs currently connected (up to
           MAX_NUM_PROXY_PAIRS). */
        private var num_proxy_pairs:int = 0;
        /* Number of proxy pairs ever connected. */
        private var total_proxy_pairs:int = 0;

        public var rate_limit:RateLimit;

        /* Badge with a client counter */
        [Embed(source="badge.png")]
        private var BadgeImage:Class;
        private var tot_client_count_tf:TextField;
        private var tot_client_count_fmt:TextFormat;
        private var cur_client_count_tf:TextField;
        private var cur_client_count_fmt:TextFormat;

        public function puts(s:String):void
        {
            output_text.appendText(s + "\n");
            output_text.scrollV = output_text.maxScrollV;
        }

        public function update_client_count():void
        {
            /* Update total client count. */
            if (String(total_proxy_pairs).length == 1)
                tot_client_count_tf.text = "0" + String(total_proxy_pairs);
            else
                tot_client_count_tf.text = String(total_proxy_pairs);

            /* Update current client count. */
            cur_client_count_tf.text = "";
            for(var i:Number=0; i<num_proxy_pairs; i++)
                cur_client_count_tf.appendText(".");;
        }

        public function swfcat()

}

import flash.display.Sprite;
import flash.text.TextFormat;
import flash.text.TextField;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
