Page 1 of 1

SwitchPlayer and SwitchSpectator for Game Host

Posted: 06 Sep 2009, 19:52
by Ross Przybylski
I was reading through the Flash AS3 API today to find the functions needed to switch players to spectators and vice-versa. I realized, however, that it's handled as a the SmartFox client method rather than a user object function, which I feel is a bit limited. In my game, I want to give the game host control over who can be spectator or player. I should be able to work around this sending a game object to direct clients to switch themselves, but it would be nice to have the option to supply an ID of a user you'd like to switch as a parameter of this function so the hosting player could switch anyone they choose.

Edit: Along those same lines, it would also be helpful to have a built-in boot function so that a game host could kick a player out of their game room. I realize this can be accomplished with Extensions, but since it's such a useful tool that it would be beneficial to have it directly within the Flash API.

Posted: 17 Sep 2009, 15:20
by Lapo
In my game, I want to give the game host control over who can be spectator or player.
You can do that from server side, which btw is the only safe place to do it.
Edit: Along those same lines, it would also be helpful to have a built-in boot function so that a game host could kick a player out of their game room. I realize this can be accomplished with Extensions, but since it's such a useful tool that it would be beneficial to have it directly within the Flash API
You can do that from client side if the User is recognized as moderator, take a look at the docs. Personally I would anyways implement both features from server side.