how to send the info to everyone in the room

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

Moderators: Lapo, Bax

Post Reply
m87dd05
Posts: 4
Joined: 12 Aug 2013, 10:06

how to send the info to everyone in the room

Post by m87dd05 »

i know how to send the message to everyone in the same room.

but when playerA enter the room how to let he can see the playerb's picture and let his picture display on the stage that PlayeB can see
(player B has entered the room before playerA)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: how to send the info to everyone in the room

Post by Lapo »

Your question is not very clear.
It seems to me that you need to use User Variables.

When User A enters a Room all other users will see his User Variables and he will be able to access all variables of the other people in the Room. This way you can store the URL of the picture in one User Variable and share it across all Users in all joined Room(s)

See here:
http://docs2x.smartfoxserver.com/Develo ... -variables

Also check this example and tutorial:
http://docs2x.smartfoxserver.com/Exampl ... vatar-chat

User variables are used to share X and Y positions but the same concept applies to your use case.
Lapo
--
gotoAndPlay()
...addicted to flash games
veeru.srinivas
Posts: 11
Joined: 31 Jul 2013, 09:08

Flash And Java Setter getters

Post by veeru.srinivas »

Hi ,

I
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: how to send the info to everyone in the room

Post by Lapo »

Say what? :D
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply