My FlashVNC client is far enough along now for public demonstration. :-) You can download the .swf file here.
It is important to note that due to Flash Player security restrictions in connecting to remote addresses, you have to run the .swf file from your local file system. This means either launching it with the standalone Flash Player, or dropping the .swf file inside IE or FireFox.
Here is a screenshot of FlashVNC in action:
For more coverage (and more screenshots!), see the IFBIN news post.
The full FlashVNC source code is included in Flex By Example. The comment-to-code ratio meets IFBIN's quality standards, which means that you should be able to easily decipher what is going on behind the scenes by reading the code comments. Besides just a VNC client, the source code also contains some reusable utility classes and a DES encryption class.
This example is also a work in progress. I've only implemented a few of the encodings - Raw, Rre, CopyRect, and HexTile. I'm currently working on implementing ZLib, Tight and ZLibHex. The Flash Player itself is fully capable of rendering the screen without slowdown.. any choppiness seems to be due to the amount of data coming over the wire, so switching to a compressed encoding format should improve speed. This will be in FlashVNC Alpha 2, which will be posted to IFBIN again when it's complete.
This has only been tested against a TightVNC server, so your mileage may vary. If you encounter any problems, feel free to bug me about them. I know right click doesn't currently work, and I'm trying to decide the best way to handle it. I'm thinking about adding a "Send Right Click" option in the Flash Player context menu that opens which will send the right click event to the server, though I don't like the idea of a right click, mouse move, and left click just to handle right click. The other option I'm thinking about is a user-configurable shortcut key.. like holding down Ctrl+Alt+Shift and clicking.
This is the first of I'm sure many new types of applications that are enabled by Flash Player 8.5. Did I mention I really like ActionScript 3?


40 Comments
Hi darron,
this absolutely rocks! Is there a special version of TightVNC involved, cause i only got a white screen, but it seems to connect.
my version is: 1.3dev6
Posted by: 1stpixel | November 16, 2005 9:31 AM
I've only tested against 1.2.9. Also, right now I'm only supporting "true color" mode. The server I connected to as 32bit color depth... that would be the first place I'd start looking.
Posted by: darron | November 16, 2005 9:38 AM
that was it ... so 1.3dev6 IS working :-) cool man!
will there be a 16 bit mode ? cause 32bit is hell slow, compared to native tvnc-client ...
Posted by: 1stpixel | November 16, 2005 9:50 AM
Yup - all color modes will be supported in the future. This is still alpha, and is still undergoing development...
The slowness of 32 bit color isn't any fault of the Flash Player as it has no problem rendering the screen - the amount of data coming over the wire is the bottleneck right now. Using a more compressed encoding format should help with performance as well.
Did I mention it's still a work in progress? It's too cool not to share though in is current state... :-)
Posted by: darron | November 16, 2005 10:02 AM
Did I mention it's still a work in progress? It's too cool not to share though in is current state... :-)
yeah, i remember so ;-)
why didn't you start with 16 bit though ? :-)
Posted by: 1stpixel | November 16, 2005 10:11 AM
ouch ... you should allow blockquote elements in your comments ...
Posted by: 1stpixel | November 16, 2005 10:12 AM
The server I was connecting to that I was testing against was 32 bit, and by default VNC uses the color depth of the server unless the client specifically asks for something else. At the time I hadn't yet implemented the "client asking for something else yet" and was more concerned with getting the drawing routines correct.
Now that the heavy lifting is done, the extra color modes should be cake. :-)
Posted by: darron | November 16, 2005 10:19 AM
Absolutely brilliant. Great work, and keep it up.
Posted by: Abel Rios | November 16, 2005 10:36 AM
Hi darron, I still get the white screen :( I already installed TightVNC on that machine, where I previously had RealVNC installed.
I tried it with other server, but on that one , once I entered the password nothing appears. The Auth. window disappers, and I cannot try to reconnect, I dont know if the connect button's state it's disabled.
Is there anything else I can do ? :) Thanks! and Congratulations for such a great job.
Posted by: Mario | November 16, 2005 1:07 PM
Great work!
Digg it...
http://www.digg.com/software/FlashVNC_Released
Posted by: Jonathan Moore | November 16, 2005 4:45 PM
Mario,
The most common "White Screen" error is that you are running FlashVNC.swf and the server on the same machine. This is a know issue with all other VNC clients as this forces the Client into rerendering itself in an almost infinite loop of drawing blocks. I am not sure if the TightVNC locks the sending of data when this occurs but I have recieved a "White Screen" everytime I try to run FlashVNC on the same machine as the server.
Currently I am testing using VMWare to run the client and server on the same hardware without issue.
If you have any issues with FlashVNC, please post them, we are very interested in making the release very solid and obviously we cannot fix bugs we do not know about.
Regards,
Ted Patrick
IFBIN Founder/CEO
Posted by: Ted Patrick | November 17, 2005 2:22 AM
works with RealVNC as well :)
Posted by: veejay | November 17, 2005 9:01 AM
Really impressive !
Thanks a lot for this first release...
"Work in progress" but already exciting...
Cheers,
Romain
Posted by: Romain Ecarnot | November 17, 2005 9:03 AM
Hi Darron,
we will test your sfw-solution soon. We are using TightVNC Server for our flash based webconferencing solution.
There is one problem with TightVNC Server: It can handle only a very limited amount of connections, because as soon as several people conects to it, the bandwidth starts to multiply and the upload stream of the person, who is sharing his screen, starts to be a bottleneck.
There is a solution out there, called vnc reflector (written by the same guy who has written tight vnc server), which solves that problem: it resides on a server (IIS or Apache) connects to the TightVNC Server on the PC of the person who wants to share, and distributes to a lot of clients.
We have rebuild parts of it, to make it able for multi-sessions (vnc reflector can handle only one session with several clients).
We also added http tunneling. I can imagine that it would be pretty useful addition for your solution because it helps to stream sessions with a lot of clients.
If you are interested to collaborate, please let me know.
Thanks
Martin
Posted by: Martin | November 17, 2005 3:43 PM
So, what is the point? Serious question. I can't think of a reason I would want to use a Flash based VNC client instead of a builtin client, especially since it must be used locally?
Posted by: dontgetit | November 17, 2005 4:26 PM
Hi Darron! I'm running TightVNC 1.2.9 on one of my servers, and I too get the white screen of nothingness when I attempt a connection. I *do* have TightVNC viewer and server installed on my machine, but the server side of it is not running.
Perhaps I'm just missing something?
Posted by: bcal82 | November 17, 2005 4:47 PM
Hi Theodore, thanks for your help. It's weird :( , Im still getting the white screen, Im trying to connect to a server which its in a different subnet, as well as one on my subnet, and on both I get the white screen.
I have tried TightVNC and RealVNC :|
Posted by: Mario | November 17, 2005 5:08 PM
Impressive.
Will this ever be as good as the java applet client...? The java applet loads fast and almost every computer has support for java applets through the browser.
It also is a built in feature in realVNC client/server bundle
Posted by: star | November 17, 2005 5:11 PM
I dropped the swf file into my browser and I just get a grey screen. I'm running firefox on linux. Any ideas?
Posted by: Naveed | November 17, 2005 6:16 PM
Same here, gflashplayer and firefox just show a blue gray background. How do I tell it where my vnc server is?
Posted by: ldb | November 17, 2005 7:41 PM
I also just get a blue/grey screen. Any ideas?
Posted by: didymus | November 17, 2005 8:08 PM
Responding to some comments (in no particular order):
Right now the Flash 8.5 Player isn't available for Linux, which means that you'll be unable to use FlashVNC until the player becomes available (no idea when that will be). Macromedia are actively seeking Linux gurus for programming help to get the player on the platform. See Tinic's post here and Macromedia's job opening.
If you're a Linux geek with experience in media, Flash could use your help.
Yes, FlashVNC will be just as good as Java clients. This is an alpha release just to showcase what's possible - there are plenty of optimizations to make, and it's not "feature complete" yet.
There are multiples reasons that I created a VNC client for Flash as opposed to using a Java client.
* First, I'm a Flash developer at heart and ActionScript is my language of choice. AS3 is a huge advancement, and I wanted to show the power of the language. Flash was never able to do this kind of application until now in 8.5.
* Second, Flash is installed on many more computers than Java, so theres a wider reach.
* Third, the VNC client itself is tiny. Right now I believe the .swf is ~230k, but over 200 of that is the Flex framework (which, admittedly, isn't necessary for this application). I'll be stripping out unnecessary pieces, and I'd venture to say I can deliver a .swf file (VNC client) in less than 32k. That's smaller than the other clients I've seen.
* Fourth, integration is key. To enable remote control in a Flash/Flex application, it will be as simple as instantiating a new component:
<ifbin:VNC id="remoteComp" host="my.host.com" port="5900" passwordNeeded="askUserForPassword();" />
Imagine a help desk call center built in Flex that allows a user to log in and chat with a representative. If the representative can't help the user diagnose the problem, the application can integrate with VNC to open a remote connection to that computer without having to switch to an external program. Obviously, some other code will be necessary behind the scenes to create a server on the client's computer and handle the connection, but I'm sure there are other business cases as well. Remember, VNC servers can be "view only" so this would be a good type of application for screen sharing in a collaborative environment.
Flash is succeeding where Java applets have failed. I don't buy the "Java is better" arguments, sorry. If you're commenting just to say it's been done before in Java and the Flash version will never be as good, move along please. I'll continue to update FlashVNC and hopefully convince a few more of you to take Flash seriously in the coming weeks/months.
As for the security requirement and having to launch the .swf file from your local file system, the Flash player itself is still alpha so things are subject to change in the future. I wouldn't be surprised if there was a way to digitally sign .swf files, or allow the users to mark .swf files as trusted which would enable FlashVNC to connect to a server even if the .swf is served from a web page. I don't think this is set in stone yet, this is just "what works today".
Anyway, thanks everyone for the positive comments. Thanks for the negative comments too, it just makes me want to work harder to prove you wrong! :-) I'll make an Alpha 2 version available in the near future to support better color options and more encodings, which should really increase performance. Stay tuned....
Posted by: darron | November 17, 2005 8:10 PM
nice work
I just need Flex2 now. :(
Posted by: michal | November 18, 2005 5:18 AM
Superb!
That solves so many problems for me.
Posted by: Tim | November 18, 2005 7:50 AM
java could do this almost 10 years ago..
lets move on..
Posted by: oh | November 20, 2005 5:17 PM
Yeah, but Java doesn't fit in a player sized less than 1MB, as FP does. I start feeling uncomfortable with these flash/anything-else comparisions.
Great work Darron, I love it.
Posted by: daniel | November 21, 2005 3:09 AM
Java this, Java that...at least Macromedia is moving forward with Flash and ActionScript. For the past few years now Sun has had their heads up their asses not really knowing what to do with Java. And people know this...consumers have way more trust in Flash than clunky Java Applets...yes Java is fast and has had an influence in the world but where is it going?
Posted by: Ralph | November 21, 2005 2:36 PM
is source available ?
Posted by: andrew taylor | November 21, 2005 4:42 PM
Tried it from my laptop and it knocked out my router. I'll hopefully run some more tests again this evening.
But it's sure inspirational stuff.
Posted by: #/cisnky/# | November 22, 2005 11:35 AM
Couldn't get it to work with Mac OS X 10.4.3, connecting to TightVNC in WIndows 2000. I get the password dialog, but after entering the password, nothing happens (yes, I waited =P)
Posted by: Audun | November 23, 2005 10:41 AM
What are all the files I'm going to need. I have real VNC, and I use JAVA to connect remotly but I want to try this... I need more than this one SWF file
Posted by: Dan | November 23, 2005 8:45 PM
The only other thing you need is the alpha Flash Player 8.5 available from http://labs.macromedia.com. Remember, this is all alpha quality - FlashVNC will be much better in 6 months time when "release" versions are available.
Posted by: darron | November 23, 2005 9:52 PM
Hi darron,
I have Tightvnc server install on my server.
I try to run your swf in local on my computer but it hang when i enter password.
Any idea ?
Thanks
Posted by: Fred | November 25, 2005 5:18 AM
hey Dan again... I downloaded tightVNC... works great. I also have Flex 2 Alpha with player 8.5!!
All is great except flashVNC... after I type in the password nothing happens.
How about an auto detect port? (just some input)
Yeah, it's an alpha.. can't wait until a stable version is released!
Posted by: Dan | November 25, 2005 1:25 PM
This is a great effort. I just bought your code at IFBIN and it looks great. There seems to be a problem doing CopyRects when the line is too slow, the images scramles, but that's the only visible bug. Do you think ZLIB or better compression will be possible? In that case I think we have some serious uses for this...
Posted by: Bas Horsting | March 18, 2006 6:06 PM
Nice work! I bet this could be included in tightVNC the same way the java client is.
Adobe is a lot more attentive of the market than Sun, so a flashVNC client can become an important feature. Besides, it's cool :)
Posted by: Per Gunnar Hansø | May 29, 2006 7:00 AM
This really looks great!
How is development going?
Posted by: Alex | May 31, 2006 5:32 PM
Is this project dead? It does not work in Flash Player 9.
Posted by: Kwooda | July 25, 2006 2:59 PM
Doesn't work with Flash Player 9. Get the message "VerifyError: Error #1042: Not an ABC file. major_version=46 minor_version=14."
Posted by: pan69 | August 16, 2006 6:15 PM
Correct, this is an old page / version.
See:
http://www.darronschall.com/weblog/archives/000237.cfm
and
http://www.darronschall.com/weblog/archives/000238.cfm
Posted by: darron | August 16, 2006 6:47 PM