Page 1 of 1

get room variables

Posted: 07 Mar 2011, 15:26
by izikon
hi there
I'm creating a room using the method

Code: Select all

public function openRoom(roomVO:RoomVO, maxUsers:int=15, isGame:Boolean=true):void
		{
			var room:RoomSettings = new RoomSettings(roomVO.name);
			room.isGame = isGame;
			room.maxUsers = maxUsers;
			room.variables = [new SFSRoomVariable("VO",encodeRoom(roomVO))];
			_client.send(new CreateRoomRequest(room,true));
		}
which the VO is a data of the room i'm saving for the application

when i get to the roomAdded event of SFS i can't recieve the variable
i know from what i read i can pull the room vars if the user is not inside the room

is there any other way to get those vars??

I read that its better to build extention for what i need - i dont know JAVA can i download exetetion from somewere?

thanks

Re: get room variables

Posted: 07 Mar 2011, 18:23
by Bax
i know from what i read i can pull the room vars if the user is not inside the room
is there any other way to get those vars??
In order to make Room Variables visible to users outside the room, their isGlobal flag must be set to true. But this flag can't be set on the client-side. In order to do this you have to create the room on the server side, using an Extension.
I read that its better to build extention for what i need - i dont know JAVA can i download exetetion from somewere?
An Extension is not something you download: you have to code it. Check the documentation.