HTML and CSS Reference
In-Depth Information
function render() {
var ball;
for (var i =0; i <balls.length; i++) {
ball = balls[i];
ball.x = ball.nextx;
ball.y = ball.nexty;
context.fillStyle = ball.usercolor;
context.beginPath();
context.arc(ball.x,ball.y,ball.radius,0,Math.PI*2,true);
context.closePath();
context.fill();
}
}
}
</script>
</head>
<body>
<div style="position: absolute; top: 50px; left: 50px;">
<canvas id="canvasOne" width="500" height="320">
Your browser does not support HTML5 Canvas.
</canvas>
<div id="inputForm" style="display:none;">
<form>
<input id="textBox" placeholder="your text" />
<input type="button" id ="sendChat" value="Send"/>
</form>
</div>
</div>
</body>
</html>
This Is Just the Tip of the Iceberg
There is much more you can do with ElectroServer than what we showed you in this
chapter. Sending and receiving PublicMessage events can only get you so far when de-
signing multiuser/multiplayer applications.
To start designing multiplayer applications seriously, you will need to delve into the
extension and plug-in architecture of ElectroServer, as well as explore plug-in events,
which are used to communicate to the server portion of an application. We suggest you
check out http://www.electrotank.com/es5.html for more information about the socket
server. You can also read ActionScript for Multiplayer Games and Virtual Worlds by
Jobe Makar (New Riders). Even though it centers on Flash and an earlier version of
Search WWH ::




Custom Search