get roomvariable actionscript client side

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

Moderators: Lapo, Bax

bryanadams

get roomvariable actionscript client side

Postby bryanadams » 13 Feb 2012, 13:49

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;
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Postby A51Integrated » 13 Feb 2012, 15:58

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

Postby bryanadams » 24 Mar 2012, 14:12

thanks

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 18 guests