ECOBOT is released!

We have just released a public beta of a new personal carbon tracking application called ECOBOT.

ECOBOT is an open source Adobe Air application, developed by TAXI Canada and One Pixel Off.

To find out more about it, and to get a copy visit: ecobot.taxi.ca

A listing XML Socket Servers for Flash

This is a list I compiled recently of commercial and opensource XML socket server's for flash. Along with some code examples of how to get started writing one from scratch.


COMMERCIAL/NON-OPENSOURCE

Electro Server 3
java based
commercial
- $299.00 for 50 users
- $599.00 for 100 users
- $899.00 for 200 users
- $1599.00 for 1000 users
- $2999.00 for unlimited
http://www.electrotank.com/ElectroServer/

colin moock's unity
java based
commercial
- $99.99 - express up to 100 connections
- $699.00 - enterprise unlimited
http://moock.org/unity/buy/

NowCentral
java based?
commercial
- $95.00 - up to 64 users
- $495 - unlimited
http://www.nowcentral.com/

eClever
windows binary
comercial - price ranging from free for up to five users to $547.00 for 500+ users
http://multiuser.web-cd.net/en/default.aspx

Bricole XML Session Server
java based
free - but not opensource really
http://www.bricole.se/xss/copyright.html

Fortress Server by Xadra
discontinued


OPENSOURCE/FREE

red5 - built in xmlsocket + flash audio/video streaming
java based
opensource
http://osflash.org/red5

Palabre
Python based
opensource
http://swik.net/palabre-flash-xml-socket-server

Swocket
python based
opensource
http://swocket.sourceforge.net/

Multiserver
java based
opensource
http://www.shovemedia.com/multiserver/

Chatter
perl based
opensource
http://www.pushby.com/chatter/

Power Flasher SOS
java based - PHP client sample code
opensource
http://sos.powerflasher.de/english/english.html

Flash Unity
PHP based - alpha
opensource - GPL
replacement of the CyberSS (http://projects.cyberlot.net/trac/cyberss) php xml socket server
http://www.flashunity.com/wiki/Faq
http://pear.cyberlot.net/index.php
sample
http://chat.cyberlot.net/

Jabber.org Server
Java based
Flash has to use XMPP to communicate with the server.
XIFF is a opensource XMPP toolkit for Flash (AVM2/Flash Player 9/FLEX2 port available)
http://www.jivesoftware.org/xiff/
opensouce
http://www.jabber.org


SIMPLE XML SOCKET SERVER CODE EXAMPLES

Alan Nouri's Blog | dubi.org
simple socket server in python
http://www.dubi.org/python-socket-server-for-flash

Ted Patrick's Blog | Ted On Flex | http://www.onflex.org
simple socket server in python
http://www.onflex.org/ted/2003/10/non-xml-over-xmlsocket-for-f5-f7.php

HeliantTM Whitepaper: XMLSocket Simplified by Shengdar Tsai
simple socket server in perl
http://www.heliant.net/~stsai/code/

ZEND Developers Zone
writing socket servers in PHP with ZEND
http://devzone.zend.com/node/view/id/1086

Java meets Flash - by Tom J. McClure
writing socket servers in Java.
http://www.dagblastit.com/java/sockets.html


Other resources

The Flash XML FAQ - has info about xml socket servers
http://www.huikuri.com/flash/xml/

Temporal Displacement Map In Flash

It's a time based fun house mirror.

Another quick hack, this time of a temporal displacement map applied to video. Here is the source such as it is: temporalcamera.zip.

Slit Scan Camera Experiment In Flash

A very simple slit scan camera set up in flash. Most people are familiar the visual effect of a slit scan camera from photocopiers, and scanners. It works because the image is only captured from a single column or row that moves across the picture plane over time. The result is visual distortion of anything that moves while the scan line is crossing the picture plane, sort of a temporal fun house mirror.

I can't think of any practical applications of this for flash developers, but it is fun toy to play with. Here is the source: slitscancamera.zip

Flash in the Can

I only made it to the first two days of the conference because I had to take a day off becasue of bad cold, but my brain was full by then anyway. The biggest relevantion of the conference for me was that FLEX 2 will be free except for "Flex builder" application/eclipse plugin and the enterprise level versions of flash dataservice (neither of which have announced prices). The details of AS3 were pretty exciting, finally one event model for all components! Finding out that Flash player 9 (formerly 8.5) is going to work with a seperate virtual machine for executing the new byte code generated from AS3 code was pretty neat too.

In the key note it a graph was shown that projected that adoption of flash player 8 has probably broken 90% by now (I'm not sure if it's up on the Adobe site yet). Finally I can start push Flash 8 for mainstream websites. Hopefully with the new upgrade/install feature of Flash 8 it won't take this long for Flash Player 9 to hit 90% and I can leave all of the legacy actionscript weirdness behind.

I skipped most of the high profile designer presentations like Erik Natzeke's and Josh Davis's. Those guys have had presentations pretty much every year I've gone, plus there were presentations on open source flash projects at the same time. Aral Balkan gave a nice overview of all projects at osflash.org, and John Grden and Chris Allen showed off Red5. I expect we will be hearing a lot more about Red5 as time goes on.

I did manage to go to Geoff McFetridge's presentation though, and although he only mentioned flash once, and only in passing, I thought it was a great counter point to all of the technical and business work presented. A lot of flash designers get tend caught up in the technical execution of things, which isn't necessarily a bad thing by any means you are a flash designer. McFetridge isn't a flash designer though, he's a designer who has done a flash site or two. So it was nice to have a perspective on general design issues, which are of course relevant to but not exclusive to flash design. The bigger picture outside of the monitor if you will. Particularly from a designer like McFetridge who persues what you might call a sort of corny (in a good way of course) simplicity or innocence in his owrk. It was a great contrast to the standard slick futuristic "impossible architecture" type stuff most flash designers like to show off.

How that might work?
Vyew's clever desktop sharing to flash player using a Java applet.

If you haven't seen it yet Vyew is an online meeting/desktop sharing web application which for the moment at least is free to use. It's very much a direct competitor to Adobe's own Acrobat Connect (formerly Macromedia Breeze), which much sting a little since it's using Flash as the delivery platform.

What really intrigued me about it was that it was able to do desktop capture. Although this can be done when using Adobe Acrobat Connect, desktop recording is not something that can be done using Flash player alone. Macromedia didn't provide this functionality as part of the Flash player, presumably to prevent Flash based competition to Breeze. From what I gather, the way the Vyew site does it (on my Mac at least) is to work around this issue by using a java applet to do desktop capture.

That java could do this was news to me. It turns out there is a built in class java.awt.Robot that makes it pretty easy to do. I discovered this when I took a look at the source for the open source Screen Recorder by One Stone Soup.

But what do you do with a bit map image of your screen once you have captured it with the Robot class? Well if you want to playback the video through flash like Vyew does then the best way to encode it would be using the Screen Video FLV codec. The FLV video encoder that came with Flash IDE used to allow you to encode video with this codec, but they took away this option with the encoders after Flash MX 2004 I believe. Fortunately there isn't much to the Codec as I found out when I took a look at another opensource project libFLV. From the looks of the implementation in libflv the Screen Video codec just uses zlib style compression. You wouldn't be able to use libFLV out of the can with java though because it is written in C. A java port of it would have to be written, this isn't insurmountable though. Java comes out of the box with compatible compression methods. I had half a mind to take a crack at it myself. With that in mind I started looking for documentation on the FLV format.

Adobe does have documentation on FLV format available for developers, unfortunately the license tied to it restricts it from being used for anything like a screen recording java application, or applet. Fortunately OsFlash.org has some pretty good documentation on the the FLV format.

In theory (or should I say in practice since Vyew is already doing it) it should be possible to write a Java application that can record your desktop and write that data as a stream of data in the FLV format using the Screen Video codec, but how do you get that stream into your friends' the flash players? Unfortunately Flash Media Server does not support the Screen Video codec, at least that's what I read online. I found mention of it supporting it in the beta online, but apparently was removed for the public release. I guess it is only available in the version used for the Acrobat Connect/Breeze server. So even if you could get the FLV stream to the flash communication server, it couldn't stream it to the flash clients.

Enter another opensource project, Red5. Not only does Red5 support streaming of the Screen Video Codec, they also have proof of concept code for a java RTMP client in their SVN repository. With the the Red5 Java based RTMP client and server we have the components necessary for sending a FLV stream to a server, and for relaying in realtime to other the flash player on other peoples computers.

Besides putting the pieces together into a signed java applet, the only thing that is really missing is a Java library that can compress a sequence of images to FLV using the Screen Recording Codec. Sure it would be a bit of work but all the pieces are there.

And what about other FLV codecs? On2 VP6 is proprietary, and there aren't any opensource projects that can create or read FLVs using that codec. However there are a few projects for reading and writing the Sorenson codec, such as FFMPEG. How can they do that you might ask? Well the Sorenson Codec is compatible with the open H.263 codec. Java supports encoding and decoding of H.263 as part of the Java Media Framework. You can also capture video from a webcam using JMF. As for audio, JMF supports MP3, and ADPCM recording encoding and decoding.

So it looks like there are a lot of ways you could use Java to create, manipulate, decode, and even stream FLV video files. As developers continue to put these pieces together I suspect we will see lots of cool applications like Vyew in the near future.

Flash 8 is released

I've haven't updated my blog in a while. I've been too busy finishing projects at work and trying to finish my house revovations before my second child is born.

Since my last entry Macromedia Studio 8 was released, including Flash 8. There are lots of new feautres in Studio 8 and Flash, but one of the first things I found missing from in Flash was the remoting libraries. They aren't included by default and the Flash MX 2004 remoting libraries installer won't work with Flash 8. You can manually install remoting in Flash 8 by following the instuctings on Peter Elst's blog.

I've found a few other neat flash tidbits recently:

A online pixel font maker. Best of all it's free, and easier to use than fontographer. Did I mention it was free?

SWFTOOLS a GPL colleciton of tools for mucking about with swfs. Also free.

BlogCFC was created by Raymond Camden. This blog is running version 5.5.003.