get roomvariable actionscript client side

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

Moderators: Lapo, Bax

Post Reply
bryanadams

get roomvariable actionscript client side

Post by bryanadams »

Hi,
i have roomvariable it name is 'Roomx' & value=55 but i cant access the variable code is below i tried 2 method but givining error

thanks


private function onRoomJoin(evt:SFSEvent):void
{
var room:Room=evt.params.room;
var extension_id :String= room.getUtfString("Roomx");
var roomVars:Array = room.getVariables();
var Roomx2:String = room.getStringValue("Roomx") as String;
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Post by A51Integrated »

You have mixed up some code.

Try:

Code: Select all

private function onRoomJoin(evt:SFSEvent):void 
{ 
     var room:Room = evt.params.room; 
     var roomVar:RoomVariable = room.getVariable("Roomx");

     trace('My var is: ' + roomVar.getIntValue());
    
}
A51 Integrated
http://a51integrated.com / +1 416-703-2300
bryanadams

Re: get roomvariable actionscript client side

Post by bryanadams »

thanks
Post Reply