August 2010
Intermediate to advanced
412 pages
8h 59m
English
We have created a basic example to log in to the SmartFoxServer. Now we are going to create a whiteboard so every connected user can draw on the same whiteboard.
The concept is to add mouse listeners to handle the event when mouse is down, mouse moves, and mouse is up. When the mouse is down and moves, the application broadcasts the mouse coordination to all users within the room and all users then draw the lines according to the received coordination.
We will have a glance of the full code and explain it part by part in detail.
package { import it.gotoandplay.smartfoxserver.SmartFoxClient; import it.gotoandplay.smartfoxserver.SFSEvent; import it.gotoandplay.smartfoxserver.data.Room; import it.gotoandplay.smartfoxserver.data.User; ...Read now
Unlock full access