| Package | com.whirled |
| Class | public class AbstractControl |
| Inheritance | AbstractControl flash.events.EventDispatcher |
| Subclasses | AbstractSubControl, AVRGameControl, AVRServerGameControl, EntityControl, GameControl |
| Method | Defined by | ||
|---|---|---|---|
|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
| AbstractControl | ||
|
doBatch(fn:Function, ... args):void
Execute the specified function as a batch of commands that will be sent to the server
together.
| AbstractControl | ||
|
isConnected():Boolean
Are we connected and running inside the whirled environment, or has someone just
loaded up our SWF by itself?
| AbstractControl | ||
|
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Unregisters an event listener.
| AbstractControl | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Event.UNLOAD Dispatched when the SWF using this control has been unloaded. | AbstractControl | |||
| addEventListener | () | method |
public override function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):voidRegisters an event listener.
Parameterstype:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0) |
|
useWeakReference:Boolean (default = false) |
| doBatch | () | method |
public function doBatch(fn:Function, ... args):voidExecute the specified function as a batch of commands that will be sent to the server together. Messages can be sent no faster than a rate of 10 per second. Using doBatch groups a number of set or sendMessage operations so that they are treated as a single unit towards this limit. For best performance, it should be used whenever a number of values are being set at once.
Parametersfn:Function |
|
... args |
_ctrl.doBatch(function () :void {
_ctrl.net.set("board", new Array(100));
_ctrl.net.set("scores", new Dictionary());
_ctrl.net.set("captures", 0);
});
| isConnected | () | method |
public function isConnected():BooleanAre we connected and running inside the whirled environment, or has someone just loaded up our SWF by itself?
ReturnsBoolean |
| removeEventListener | () | method |
public override function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):voidUnregisters an event listener.
Parameterstype:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |
| unload | event |
flash.events.Event
Event.UNLOAD Dispatched when the SWF using this control has been unloaded. You should clean-up any resources that would otherwise stick around, like stopping any Timers, cancelling any sound streams, etc.