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());
}
}