Wednesday, January 23, 2008

First of many

In class, I started a small Flash chat client and C# chat server.

It serves as a quick intro to Flash textfields, buttons, and XML sockets. It also brings up the issue that sometimes Flash Lite handles UI elements differently from desktop Flash. On the phone and in Device Central, the input text fields only send out "onChanged" events when you hit enter. On the desktop flash player, that same text field "changes" after every character you type.

As an added bonus, it's also an introduction to socket communication and threading in C#. The server runs on either the phone or the computer (M$ can do some things right). The server doesn't really do much when someone leaves the chat, but I "handle" the exception. Also, it will screw up if the incoming message (the whole XML doc) is larger than 256 bytes. Be terse.

Click here for the file.

No comments: