How to Create a Flash Demo using Vnc2swf

Monday, August 25, 2008

Creating a flash demo is an effective way to make presentations, demonstrate working of a software, etc. But if you need to make eleventh hour preparation of flash demos, or in a hurry to create animated presentations, the following quick steps will be handy.

Vnc2swf is a light weight tool available for screen recording from any remote system, its a free tool with Windows as well as in Linux ports, often I got questions about the way to use it to create flash presentations from screen recordings, since I mostly for Solaris, I will give a quick step by step guide on how to use it to create your flash demo in minutes if you are new to this.

Vnc2swf comes in two flavours, one implemented in C and the other one in python (pyvnc2swf), the easiest way is to use the C version if you are working from Linux/Solaris environments.

1. Installing VNCServer and VNCViewer:

The well known free VNCServer/Viewer tool available for all platforms under GPL is RealVNC, which can be downloadable from here. The Windows/Linux installation is straightforward with the respective binary installers, after starting the RealVNC server (In Windows, Programs -> RealVNC -> VNC Server 4 user mode -> Run VNC Server), one can create a password for accessing the VNCServer (In Windows, Programs -> RealVNC -> VNC Server 4 user mode -> Confgure user-mode settings, select Authentication configuration), then from the remote system use VNCViewer (In Windows, Programs -> RealVNC -> VNC Viewer 4 ->. Run VNC Viewer) to access the server desktop.

For Solaris SPARC, RealVNC 4.1.2 Package is available, for Solaris x86 architecture, one can build RealVNC 4.1.2 from its source (or use one can download xVNC from here). In most recent Solaris distributions, VNCServer is available by default. Once VNCServer package is installed, one can start the VNCServer using the vncserver command, before that one can create a password for VNCServer access (Similar procedure may apply for Linux as well).

bash-3.00$ vncpasswd

Once password is assigned, VNCServer can be started using the following command, the below is a sample output of VNCServer started on the vnchost on a Solaris box.

bash-3.00$ vncserver

New 'vnchost:1 (testuser)' desktop is vnchost:1

Starting applications specified in /home/testuser/.vnc/xstartup
Log file is /home/testuser/.vnc/vnchost:1.log

Once VNCServer setup is done, from the remote system one can use vncviewer command to access the remote desktop. The below sample output shows the successful execution of vncviewer command from remotehost to vnchost.

bash-3.00$ vncviewer vnchost:1

VNC Viewer Free Edition 4.1.2 for X - built May 15 2006 21:43:03
Copyright (C) 2002-2005 RealVNC Ltd.
See for information on VNC.
CConn: Throughput 20000 kbit/s - changing to hextile encoding
CConn: Throughput 20000 kbit/s - changing to full colour
CConn: Using pixel format depth 24 (32bpp) little-endian bgr888
CConn: Using hextile encoding

Once you get the remote desktop, then you are ready to use Vnc2swf.

Note: To enable or disable access control, one can use xhost - or xhost + command on the VNCServer.

2. Installing and running Vnc2swf (C Version):

This procedure applies to Solaris box, but can be applicable to other flavours of linux as well.

1. Download the source here.

2. Untar the source, cd into the source directory, execute ./configure, make, make install (Make sure you have a valid GCC Compiler installed, it may be found in /usr/sfw/bin, set PATH to make command as well, /usr/ccs/bin).

3. Now vnc2swf will be installed in the directory /usr/X11R6/bin (on a solaris box).

Now from any remote host, one can use Vnc2swf and connect to the VNC server host for screen recording, a sample output is shown below, here the recorded file is record.swf, it generates an HTML code (shown in the bottom), which can be invoked to run the recorded flash demo (After you get the remote desktop, press F9 to start/stop recording).

bash-3.00$ vnc2swf record.swf vnchost:1
vnc2swf version 0.5.0
Copyright (C) 2002-2005 Yusuke Shinyama <yusuke at cs dot nyu dot edu>
- Based on VNC viewer version 3.3.7
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See for information on VNC.
VNC server supports protocol version 3.8 (viewer 3.3)
VNC authentication succeeded
Desktop name "vnchost:1 (testuser)"
Connected to VNC server, using protocol version 3.3
VNC server default format:
16 bits per pixel.
Most significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Using default colormap and visual, TrueColor, depth 24.
Using viewer's native pixel format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16
=== WriteInitMovie: Pid=5793, Opening file: "record.swf" for a movie size (1024, 768), frame rate 12.00...
=== WriteFinishMovie: 4175 bytes dumped into "record.swf".
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1024" height="768" codebase=",0,0,0">
<param name="movie" value="record.swf">
<param name="play" value="true">
<param name="loop" value="true">
<param name="quality" value="high">
<embed src="record.swf" width="1024" height="768" play="true" loop="true" quality="high" type="application/x-shockwave-flash" pluginspage=""></embed>

3. Installing and running pyVnc2swf:

Running pyvnc2swf requires Python Imaging library or pygame module, for the sake of completeness, I will mention that too (using Python Imaging Library).

1. Download Python Imaging Library here.

2. Untar Python Imaging Library (Latest version is1.1.6).

3. Set PYTHONPATH to <Python_Imaging_Lib_Home>/Imaging-1.1.6/Imaging-1.1.6/PIL, this would ensure that the python imaging libraries would be used from this directory.

4. Download pyVnc2swf here.

5. Untar pyVnc2swf, cd to pyvnc2swf directory from the extracted directory.

6. Now run python, a GUI will be displayed where one can specify the server name, port on the VNCServer, the recorded output file, then click Start button to start recording.

7. From Windows, one can do the same thing by installing pyvnc2swf and launching it (Programs -> pyvnc2swf -> vnc2swf).

Its so simple to create flash demos, isn't it!

1 comment:

An Binh said...

Azdecor là đơn vị chuyên thiết kế thi công nội thất văn phòng tại khu vực Tp Hồ Chí Minh và các tỉnh thành lân cận. Với đội ngũ họa viên thiết kế được đào tạo kiến thức bài bản và thợ thi công nhiều năm kinh nghiệm trong nghề, Chúng tôi tự tin sẽ đem lại cho Khách hàng những sản phẩm đẹp với chi phí cạnh tranh. Mỗi một doanh nghiệp, công ty thì việc có một văn phòng làm việc đẹp, hợp phong thủy chuyên nghiệp, một văn phòng làm việc năng động thoải mái, lại vừa đảm bảo tính thẩm mỹ kiến trúc, cho nên chúng tôi công ty thiet ke noi that phong lam viec không những giúp nhân viên có một không gian làm việc tốt có thể vừa làm việc vừa thư giãn một cách hợp lý, một văn phòng đẹp sẽ giúp nâng tầm doanh nghiệp bạn trong mắt khách hàng và đối tác. Nếu bạn có nhu cầu hãy liên hệ với chúng tôi thiết kế nội thất chuyên nghiệp với nhiều năm kinh nghiệm trong lĩnh vực thiết kế thi công nội thất văn phòng.

Copyright © 2016 Prasanna Seshadri,, All Rights Reserved.
No part of the content or this site may be reproduced without prior written permission of the author.