Changeset View
Changeset View
Standalone View
Standalone View
support/aphlict/client/src/AphlictClient.as
| Show All 36 Lines | final public class AphlictClient extends Aphlict { | ||||
| public function AphlictClient() { | public function AphlictClient() { | ||||
| super(); | super(); | ||||
| loaderInfo.uncaughtErrorEvents.addEventListener( | loaderInfo.uncaughtErrorEvents.addEventListener( | ||||
| UncaughtErrorEvent.UNCAUGHT_ERROR, | UncaughtErrorEvent.UNCAUGHT_ERROR, | ||||
| this.uncaughtErrorHandler); | this.uncaughtErrorHandler); | ||||
| ExternalInterface.addCallback('connect', this.externalConnect); | ExternalInterface.addCallback('connect', this.externalConnect); | ||||
| ExternalInterface.call( | |||||
| 'JX.Stratcom.invoke', | this.setStatus('ready'); | ||||
| 'aphlict-component-ready', | |||||
| null, | |||||
| {}); | |||||
| } | } | ||||
| private function uncaughtErrorHandler(event:UncaughtErrorEvent):void { | private function uncaughtErrorHandler(event:UncaughtErrorEvent):void { | ||||
| this.error(event.error.toString()); | this.error(event.error.toString()); | ||||
| } | } | ||||
| public function externalConnect( | public function externalConnect( | ||||
| server:String, | server:String, | ||||
| port:Number, | port:Number, | ||||
| subscriptions:Array):void { | subscriptions:Array):void { | ||||
| this.externalInvoke('connect'); | |||||
epriestley: This event was purely informational and served no real purpose. We can get everything we need… | |||||
| this.remoteServer = server; | this.remoteServer = server; | ||||
| this.remotePort = port; | this.remotePort = port; | ||||
| this.subscriptions = subscriptions; | this.subscriptions = subscriptions; | ||||
| this.client = AphlictClient.generateClientId(); | this.client = AphlictClient.generateClientId(); | ||||
| this.recv.connect(this.client); | this.recv.connect(this.client); | ||||
| this.timer = new Timer(AphlictClient.INTERVAL); | this.timer = new Timer(AphlictClient.INTERVAL); | ||||
| ▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines | |||||
This event was purely informational and served no real purpose. We can get everything we need with status events instead.