get room variables

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
izikon
Posts: 2
Joined: 30 Mar 2009, 15:18

get room variables

Post 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
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: get room variables

Post 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.
Paolo Bax
The SmartFoxServer Team
Post Reply