August 30, 2011
Removing spaces between images in HTML
The following code shows how to use HTML to align a grid of images in rows and columns without tables, with no spaces or gaps between the images.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Image Grid Example</title>
<!--CSS-->
<style type="text/css">
.row {
line-height:0;
}
body {
background-color: #000000;
}
</style>
</head>
<body>
<div class="row">
<img src="tile_1.gif"
/><img src="tile_2.gif"
/><img src="tile_3.gif"/>
</div>
<div class="row">
<img src="tile_4.gif"
/><img src="tile_5.gif"
/><img src="tile_6.gif"/>
</div>
<div class="row">
<img src="tile_7.gif"
/><img src="tile_8.gif"
/><img src="tile_9.gif"/>
</div>
</body>
</html>
There are two somewhat unintuitive techniques required to remove the spaces between the images:
- There must be no space between the <img> tags. For example, the following code causes an unwanted gap between tile_1 and tile_2:
<img src="tile_1.gif"/> <img src="tile_2.gif"/> - The images must be placed inside a <div> element with the CSS style line-height set to 0
August 10, 2011
Union now supports WebSocket
Starting with Union 1.1.0, OrbiterMicro (Union's JavaScript framework) includes native support for WebSocket. Using WebSocket, JavaScript applications can conduct network communications at speeds that rival ActionScript's XMLSocket and Socket (though no browser currently supports native binary data transfer). Compared to AJAX long-polling techniques (aka Comet), a basic ping (message roundtrip) over WebSocket is about twice as fast as traditional HTTP (see the live test at the link below). WebSocket also reduces bandwidth consumption by removing both redundant HTTP polling and per-message HTTP headers.
In total, Union now supports three transport mechanisms: Flash's XMLSocket, WebSocket, and traditional HTTP (a custom form of Comet). All three transports can be used at same time over the same port, allowing a JavaScript application running on one machine to communicate directly with a Flash application running on another.
For a detailed explanation of how WebSocket communications work, how WebSocket benefits networked applications, and how to use WebSocket with Union Platform, see:
June 01, 2011
Multiuser Drawing Pad Built with Pure JavaScript/HTML5/Canvas
i just posted a new example showing how to create a simple multiuser drawing pad (aka shared whiteboard, multiuser sketchpad, or collaborative painting tool) using pure JavaScript and HTML5's <canvas> tag.
to manage communication between users, the javascript code uses OrbiterMicro, which connects to Union Server.
May 02, 2011
Union 1.0 Now Shipping!
Union 1.0 is now shipping and ready for production use in real-world deployments.
Union is a development platform for creating multiuser applications. Build chat, whiteboards, real-time multiplayer games, meeting applications, collaborative editing tools, and shared interfaces that run in desktop and mobile web browsers (JavaScript), Adobe Flash, Java, C#, or dozens of other languages.
To get started building your own multiuser Union applications, follow the Union Quick Start guide.
There's lots more information, documentation, and examples at www.unionplatform.com.