1.In ES5,i found esObject in the SearchCriteria is not useful (
var fgr:FindGamesRequest = new FindGamesRequest();
var findcriteria:SearchCriteria = new SearchCriteria();
var esObject:EsObject = new EsObject();
esObject.setString("defaultroom","121212");
findcriteria.gameDetails = esObject;
findcriteria.gameType = gameType;
findcriteria.gameId = -1;
fgr.searchCriteria = findcriteria;
es.engine.send(fgr);
var mes:QuickJoinGameRequest = new QuickJoinGameRequest();
mes.createOnly = true;
mes.zoneName = zonename;
mes.gameType = gameType;
var esObject:EsObject = new EsObject();
esObject.setString("defaultroom","12312312322rosew j");
esObject.setString("zonename",zonename);
esObject.setString("gamename",userid + "的房间");
mes.gameDetails = esObject;
es.engine.send(mes);
) .
i can only filter result in the findGamesResponse.
2.how to use UpdateRoomVariableRequest .wo can only createRoomVariableRequest(
var crvr:CreateRoomVariableRequest = new CreateRoomVariableRequest();
crvr.roomId = defaultRoomid;
crvr.zoneId = e.zoneId;
crvr.name = e.gameId.toString();
var esObject1:EsObject = new EsObject();
esObject1.setInteger("roomid",e.roomId);
crvr.value = esObject1;
es.engine.send(crvr);
)
3.i think there are difference in zoneUpdateEvent between ES4 and ES5 .zoneUpdateEvent trigger before joinRoomEvent ,so there is a problem
var jrq:JoinRoomRequest = new JoinRoomRequest();
jrq.roomId = listZone.selectedItem.roomid;
jrq.zoneId =listServer.selectedItem.id;
jrq.receivingRoomAttributeUpdates = true;
jrq.receivingRoomListUpdates = true;
jrq.receivingRoomVariableUpdates = true;
jrq.receivingUserListUpdates = true;
jrq.receivingUserVariableUpdates = true;
jrq.receivingVideoEvents = true;
es.engine.send(jrq);
),but i found that in onzoneupdateEvent usercount can not refresh (
public function OnZoneUpdateEvent(e:ZoneUpdateEvent):void {
var defaultRoomList:Room = parentApplication.defaultRoom;
var users:Array = defaultRoomList.users;
Alert.show(users.length + "");
}
) .we create a default room in the web administrator,User A join and User B join, Trigger zoneUpdateEvent in User A ,but the userCount of A is 1, e.roomCount is 2 ,userCount of B is 2?


Reply With Quote
?
