diff --git a/resources/celerity/map.php b/resources/celerity/map.php index cd0e6e47d2..ee0a55a199 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -477,7 +477,7 @@ return array( 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 'rsrc/js/phuix/PHUIXActionView.js' => '6e8cefa4', 'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bd4c8dca', - 'rsrc/swf/aphlict.swf' => 'd9bca85d', + 'rsrc/swf/aphlict.swf' => '2dea6ddc', ), 'symbols' => array( diff --git a/support/aphlict/client/src/AphlictClient.as b/support/aphlict/client/src/AphlictClient.as index 2be41e98a6..dbde016a1a 100644 --- a/support/aphlict/client/src/AphlictClient.as +++ b/support/aphlict/client/src/AphlictClient.as @@ -31,6 +31,7 @@ package { private var remoteServer:String; private var remotePort:Number; + private var subscriptions:Array; public function AphlictClient() { @@ -51,8 +52,9 @@ package { this.externalInvoke('connect'); - this.remoteServer = server; - this.remotePort = port; + this.remoteServer = server; + this.remotePort = port; + this.subscriptions = subscriptions; this.client = AphlictClient.generateClientId(); this.recv.connect(this.client); @@ -61,10 +63,6 @@ package { this.timer.addEventListener(TimerEvent.TIMER, this.keepalive); this.connectToMaster(); - - // Send subscriptions to master. - this.log('Sending subscriptions to master.'); - this.send.send('aphlict_master', 'subscribe', this.client, subscriptions); } /** @@ -95,11 +93,26 @@ package { this.error(err); } + this.registerWithMaster(); + this.timer.start(); + } + + /** + * Register our client ID with the @{class:AphlictMaster} and send our + * subscriptions. + */ + private function registerWithMaster():void { this.send.send('aphlict_master', 'register', this.client); this.expiry = new Date().getTime() + (5 * AphlictClient.INTERVAL); this.log('Registered client ' + this.client); - this.timer.start(); + // Send subscriptions to master. + this.log('Sending subscriptions to master.'); + this.send.send( + 'aphlict_master', + 'subscribe', + this.client, + this.subscriptions); } /** diff --git a/webroot/rsrc/swf/aphlict.swf b/webroot/rsrc/swf/aphlict.swf index e599e5b50a..51be4530c3 100644 Binary files a/webroot/rsrc/swf/aphlict.swf and b/webroot/rsrc/swf/aphlict.swf differ