flIRC – First Steps in Flash 8.5 and Flex

THIS IS OUT OF DATE. CHECK THE NEWER VERSION HERE

flIRCI started working on my Flash IRC Client (flIRC) some time before Flash 8.5 was released. Now two days later I want to show you the first demo of my little project and experiment. You can see a very early version here.

Ther is still a lot of work to do but you can already join channels and talk. Private messages to other users are not supported yet like a lot of events like JOIN/PART/KICK/MODE etc. Please remember Flash 8.5 is now only two days old and I never used this Flex stuff before.

The application:
I am using Flex2. This is not an AS3 only project so I have got my code in theese mxml files which is a little bit confusing at the beginning but you will like it because you can be very fast. I do not care about application states, I do not care about initializing components and all this stuff. It is very easy to use. Even the alignment of the elements can be done by Flex.

Connection:
As I wrote one day ago there is a problem with the security model of Flash. The workaround is quiet simple and has nothing to do with Flash directly. I installed a proxy on my shell and just forward every connection to irc.quakenet.org. The only problem is that the connections are not client-side only.

Macromedia should handle a socket request like using the camera. A simple dialog box would make life easier.

Other problems:
The TextArea seems to be very buggy. I wont blame Macromedia for this because it is only an Alpha. But one problem is very annoying. If you use htmlText and add a lot of text very fast (while-loop for example) then the TextArea won’t display all the text you appended to it.
The workaround is using a simple flash.util.Timer and an Array where all messages get stored. On every tick one message gets added.

Most IRC clients do not support UTF-8 encoding. The socket got a writeUTFBytes() function but all the special german characters look wrong on other clients. The solution here was using a simple byte array which gets filled by a string. Most of the communication is now located in an own class called IRCSocket.

Using textarea.vPosition = textarea.maxVPosition; worked for me in Flash 8. This does not seem to work in 8.5 so currently the text wont scroll.

Links:

THIS IS OUT OF DATE. CHECK THE NEWER VERSION HERE

9 Responses to “flIRC – First Steps in Flash 8.5 and Flex”


Leave a Reply