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.
SwitchPlayer and SwitchSpectator for Game Host
-
Ross Przybylski
- Posts: 70
- Joined: 24 Jan 2008, 03:56
- Contact:
You can do that from server side, which btw is the only safe place to do it.In my game, I want to give the game host control over who can be spectator or player.
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.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