Does anyone know of a way to change the "room" a client is connected to after they have connected, on the server side?

I want to automatically segregate users into groups of ten (in each room). My first idea was to connect to a "waiting room" with info on the number of people in each other room, then re-connect people accordingly from the client side, trouble is two or more people could do this at once putting 11 people in one room.

I could refuse connections to the server until i get a room with less than 10 in it, but would this be slow with up to 500 users (meaning 50 connection attempts)?

I'm a bit new to all this flashcom business, so for all I know I'm going about all of this in completely the wrong way.

Any help would be a life saver.

Dave