Forum ActionScript 3.0 Can't get List rooms to work

Problems and discussions relating to ActionScript 3.0 here.

Can't get List rooms to work

Postby flexcool354 » October 16th, 2010, 12:12 pm

i would like it to just return all the rooms, but i can't get it to work
This is what i got for listing them

Code: Select all
trace(_client.multiplayer.listRooms("bounce", {}, 20, 0));

allways traces undefined... :(

and this is how each room is created
Code: Select all
         client.multiplayer.createJoinRoom(
            input.text,
            "bounce",   
            true,      
            {},      
            {},      
            handleJoin,
            handleError
         );

input is just a textbox
flexcool354
 
Posts: 35
Joined: September 26th, 2010, 5:31 pm

Re: Can't get List rooms to work

Postby Oliver » October 18th, 2010, 3:43 pm

Hey,

listRooms does not have any return value. You have to use the two callback arguments to the method:

http://playerio.com/documentation/refer ... #listRooms

For an example, have a look at one of the flash game examples in the download package.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Can't get List rooms to work

Postby flexcool354 » October 18th, 2010, 5:08 pm

I figured that out after looking at some other code.
but thanks anyway
flexcool354
 
Posts: 35
Joined: September 26th, 2010, 5:31 pm


Return to ActionScript 3.0