October 2005 Archives

Announcing FlashVNC

| 32 Comments | 4 TrackBacks

A revolutionary application for the Flash Platform, I'm proud to announce that I have a VNC client written for Flash Player 8.5.

Like everyone else, I've been busy experimenting with the alpha bits available at Macromedia labs. I have quite a few ActionScript 3 and Flex 2 projects in the works, FlashVNC being just the tip of the iceberg.

The new Player is incredible, and enables a whole new breed of applications to be built that simply weren't possible before. The JIT-compiled speed of ActionScript 3 coupled with new built-in classes that Flash Player 8.5 bring to the table is an incredible combination. Throw in the Flex 2 framework to rapidly create interfaces, and it really is a winning combination.

Now, I must confess, FlashVNC is not 100% complete yet, so I'm not ready to show a "live" demo. However, I've come quite a long way and am far enough along now that the finished product is right around the corner. Below is a screenshot of the working prototype:

Key Features of FlashVNC:

  • flash.net.Socket - binary socket allows connection to a TightVNC server. I've implemented the RFB protocol to establish 2-way communication between my FlashVNC client and a TightVNC server that I'm testing against.
  • DES encryption - it wasn't fun at all, but I've implemented the Data Encryption Standard algorithm for ActionScript 3. Of course this is in a reusable library, so it's not limited to just my FlashVNC project, but part of the RFB protocol is an authentication challenge that requires the use of DES.
  • BitmapData - the remote screen is drawn via low level pixel manipulation. This is a feature available in Flash Player 8, but, well.. see the next point.
  • ActionScript3 - this wouldn't be possible without the speed of ActionScript 3. The amount of calculations being performed to update the screen is a testament to how much better AS3 really is over AS2.
  • Better handling of binary data - in general, Flash Player 8.5 makes working with binary data lot easier. The new int and uint datatypes, along with flash.util.ByteArray have really aided in the creation of FlashVNC.

Of course, it goes without saying that the Flex2 framework enabled me to create an interface for FlashVNC very quickly. I was able to integrate a BitmapData instance with a Flex container, which really helped to make this application possible.

Source code should be available through IFBIN's Flex By Example once the application is finished. When I finish the application, I'll post a working demo then as well (instead of just a measly screenshot).

So yeah.. it's been quiet around here lately, and labs is the reason. Wait until you see what else I have in my bag of tricks... I'm not done yet!

The future is here

| 4 Comments | No TrackBacks

Welcome to the future of RIA development. The lab is now open!

Things have dramatically changed for this iteration. ActionScript 3 and Flex 2 are a big step up, and Macromedia has done a great job with them so far. Even though the bits available are only alpha, you can tell a lot of hard work has already gone into the product.

There's so much to see and do, I wanted to highlight just a few of the new features that I find particularly useful.

Method closures: Instead of...

component.addEventListener( "click", Delegate.create( this, handleClick ) );

... we can now write:

component.addEventListener( "click", handleClick );

... and handleClick will execute in the scope in which it's defined. This is a huge simplification.

New number types: We finally have int, and uint, (alas, no byte or char...), but it's good to have something other than just Number. There's also a ByteArray class too.. that's handy.

Binary Sockets: Now you can implement your own protocols. :-)

New DOM: There's an entirely new object model that allows much more flexibility with MovieClips. You can reparent on the fly, move things on an off the displaylist, completely restructure the displayed hierarchy.. and it's fast. The addChild method is a new best friend.

Clean API: If you want to create a new MovieClip, you simply say var mc:MovieClip = new MovieClip();, and then add it to the display list to get it to appear. No more attachMovie hackery! Plus, the new Sprite class is nice.

There's a ton of new information out now, and a lot of reading to do. Head over to the lab and check it out. This is a huge release both technically and politically as this marks the first time Macromedia have opened up their products this early in the cycle to the general public. Enjoy the early bits, and make the most of them! Using Flex has never been better...

Thank you Macromedia

| 3 Comments | No TrackBacks

If you somehow managed to miss the news everywhere else this morning, be sure to head over to the Macromedia Press Room. They've just announced major upcoming changes to the Flash Platform.

Besides the weblogs covering it, you can also find some additional articles here and here.

Some important things to note:

  • FlexBuilder 2 (previously "Zorn") will be less than $1000 per seat. No longer do you need to have a server installed to compile .swfs.
  • Flash Player 8.5 contains a completely new VM for ActionScript 3 support that offers faster runtime performance and runtime error reporting, not to mention improved debugging. The days of tracking down silent failures are over.
  • The future of the Flash Platform is strong. With Macromedia execs joining Adobe, coupled with the latest news, all of the FUD surrounding the merger is thrown out the window.
  • IFBIN has you covered. There will be plenty of new technology to learn, but IFBIN will be right in the middle of it all.

FlexBuilder 2 and Flash Player 8.5 will be available as public alphas on October 17, 2005. Mark your calendars and prepare to download, the RIA space will never be the same.

The official release date is "first half of 2006" so it will be some time before the public gets their hands on it.. but this, to me, is probably the greatest thing since sliced bread. Virtually overnight, the Flash Platform is all grown up...

Also, check out the Flex 2 intro as well - lots of good stuff in there!

Flex tab focus issue with 2 popups open

| 1 Comment | No TrackBacks

I ran into an issue where opening one popup window from another would cause the tab key to tab into the original popup, regardless of modality. It seems the focus wasn't set right for the second popup window. Here's the fix:

// import mx.managers.*;

// Create the popup window, save a reference to it
popup = PopUpManager.createPopUp( ... );

// Explicity activate the popup to prevent the "2 popup focus issue" behavior
SystemManager.activate( popup );

It's a simple enough solution, but a great little fix. As soon as you open the popup window, have the system manager activate it and you won't have any tab-focus problems on it. File this one away in your Flex bag of tricks as it may just come in handy one day. I think I'm even getting a free beer out of it from Kevin. :-)

And speaking of Kevin, now would be a good time to put a quick plug in for ServiceCapture. If you build RIAs with the Flash platform, this is a great debugging tool to see the traffic being sent between client and server. It can understand AMF data, and give you a human readable view of what is actually being sent. It's helped us on our current Flex project, and will most likely help you on yours as well. ServiceCapture is what the NetConnection Debugger should be...

Flex.org - The Directory for Flex

Archives