Packagecom.electrotank.electroserver5.api
Classpublic class GetZonesRequest
InheritanceGetZonesRequest Inheritance EsRequest Inheritance EsMessage Inheritance flash.events.Event

This request get the list of zones on the server. A zone is a collection of rooms. This request leads to a GetZonesResponse message, which contains a list of ZoneListEntry objects. Each ZoneListEntry contains a name and id property for the zone. This shows how to request the list of zones, capture the response, and print out the name and id of each.
private var _es:ElectroServer;
private function initialize():void {
        _es.engine.addEventListener(MessageType.GetZonesResponse.name, onGetZonesResponse);
        var gzr:GetZonesRequest = new GetZonesRequest();
        _es.engine.send(gzr);
}
private function onGetZonesResponse(e:GetZonesResponse):void {
        for each (var zle:ZoneListEntry in e.zones) {
                trace(zle.zoneName + ", " + zle.zoneId.toString());
        }
}
 



Public Properties
 PropertyDefined By
 InheritedmessageNumber : int
EsMessage
 InheritedmessageType : MessageType
EsMessage
 InheritedrequestId : int
EsMessage
 InheritedserverId : String
EsMessage
Public Methods
 MethodDefined By
  
GetZonesRequest(m:MessageType = null, t:TBase = null)
GetZonesRequest
  
fromThrift(t_:TBase):void
[override]
GetZonesRequest
  
newThrift():TBase
[override]
GetZonesRequest
  
toThrift():TBase
[override]
GetZonesRequest
Constructor Detail
GetZonesRequest()Constructor
public function GetZonesRequest(m:MessageType = null, t:TBase = null)



Parameters
m:MessageType (default = null)
 
t:TBase (default = null)
Method Detail
fromThrift()method
override public function fromThrift(t_:TBase):void

Parameters

t_:TBase

newThrift()method 
override public function newThrift():TBase

Returns
TBase
toThrift()method 
override public function toThrift():TBase

Returns
TBase