# Welcome on the SSWF web page (<VERSION>)

| The script used to create this animation with the sswf tool can be found here. It is a simple text file and should open in your browser. It is also available in the samples directory of the sswf archive file (V1.1.0+).
Works under Linux (packages available for RedHat, Slackware, Debian, Linux on Power, Gentoo, FreeBSD), MinGW, MS-Windows (at least win98, 2k, xp), Mac OS/X (Fink) and Irix 6.5

Go to ftp://ftp.m2osw.com/sswf/beta to download the beta

What's new? | What is SSWF? | Where can I get SSWF? | Requirements | FAQ

What's new? |  | (See the new animation source)

I found a really bad bug with the handling of the sswf TEXT tag in 1.8.1. I fixed it in 1.8.2 that I will publish soon. You can always get the source code from either the subversion or the m2osw ftp site.

He! He! It looks like I forgot to write a word or two about 1.8.1! Now you have a few more Flash 8 tags, especially the new TagPlace3 and corresponding morph. Seems to work well for me... Also, as I was at it (i.e. reading about Flash 9) I put most if not all the tags added in Flash 9 except the TagABC (i.e. the new scripting language support.) It is a biggy! So it will take me a little time to get it in place.

One note though: I compile the Debian packages under my Ubuntu box. This means they are not compatible with Debian which was the intent... But I will try to create two sets in the next build. One with -ubuntu somewhere in the name so people can down what they need depending on their system.

Well... The good news is, 1.8.0 is now officially out on SourceForge. The bad news is, I'm not yet done with the tags for Flash 8. But those implemented have been tested and work. Also, I added some info about the ActionScript3 in Flash 9 (the abcFormat).

Also, now, it is 100% official, Made to Order Software Corporation offers support and even training for sswf. If your company is hesitant, just have someone contact us about it and we'll discuss! Look here

A newer copy of version 1.8.0 is available on our ftp (see below.) The Debian and Slackware are binaries compiled with gcc 4.1 instead of 3.4. It includes a few fixes I received recently. I should be able to add some more docs soon. I hope. And finish up with the Flash 8 tags.

Flash 9 for Linux. Yes! You can now download a beta version of Flash 9 standalone player and browser plugin from Adode. It's here:

http://labs.adobe.com/downloads/flashplayer9.html

For VC8 users (and possibly older versions?!), there is now projects for Visual Studio in SSWF (version 1.8.0+). I still have to test the integration and I will have to make sure they are available when installed from the installer. At this time it's only in the source. I didn't have very much to change in the library to make it all compile, so I would think that most people are satisfied even with older versions... but now you won't even have to do that work! Lucky you!

For those who cannot wait, I have version 1.8.0 as a beta. It is starting to include version 8 tags, more documentation and also I put an error manager to properly be able to generate errors from within the library (errors that you can catch, etc.) Mainly, the PreSave() and Save() functions will generate errors in version 1.8.0. As I go along, other functions will also generate errors (i.e. so you'd get an error right away when setting a parameter not support by a tag or an action.)

Ooops #2... I noticed that I saved a weird sample directory which is a copy of the C samples with pre-compiled binaries for Linux. You can use them, but I would think that there is no point to it!

Ooops #1... the libsswf_c.c++ is not compiling with g++ version 4.x (as underlined by the fink people since Max OS/X 10.4 now uses that version of g++.) So I tried under my debian box which uses 4.1 and fixed the little problems with the hundreds of casts going on in that file. You can download the new file from SourceForge: libsswf_c-1.7.5-g++4.tar.gz. Just untar this tarball after the regular -src or -dev from within the sswf-1.7.5 directory. It will overwrite the three offending files:

    -rw-rw-r-- alexis/alexis  55435 2006-10-15 12:31:41 src/misc/cpp-to-c.c++
    -rw-rw-r-- alexis/alexis 103773 2006-10-15 12:31:46 src/misc/libsswf_c.c++      (generated)
    -rw-rw-r-- alexis/alexis  65768 2006-10-15 12:31:46 include/sswf/libsswf_c.h    (generated)

Version 1.7.5 is now on SourceForge.net. Have at it! It includes a C only library (yes! C, not C++), of course, that's a wrapper so you still need to link with the C++ library, but that will be transparent to you! You can also see the new reference and the start of the library documentation with Doxygen (look at the Tag Header for instance.) Check out the CHANGES logs for more info about what's available in 1.7.5!

I decided that I should have a forum available for SSWF. So we created a forum to talk just and only about SSWF at Made to Order Software Corp. You can find it here:

> http://www.m2osw.com/en/forum/m2osw/viewforum.php?f=8

In order to post, you will need to register (which is the case on most forums anyway.) All is required is an email address so it isn't a killer. 8-)

I wanted to add few words on the SSWF ActionScript compiler. This is a Javascript ECMAScript 4 compliant compiler (with extensions as described in the documentation.) In other words, you can write Javascript code in your .sswf file without having to write low level code as before. This is very similar to what Macromedia offers today in Flash 8. The SSWF compiler is still missing correct support for packages (i.e. you have to write all the code in your .sswf file, but you can still use the include feature of sswf to not duplicate your code between projects.) Note that Flash 8, in regard to ActionScript, is fully supported since there is no new action bytecode in Flash 8... except that I did not write all the classes yet. Any help on that one will be appreciated!

Okay! With 1.7.4 I fixed many packages (MinGW, the Fink packages for Fink, RPM for Linux, IRIX!) This is still considered a beta since I didn't have much time to work with it and thought not too many people reported bugs, I'm pretty sure it will not be fully functional yet (that is, the Javascript compier for the Macromedia ActionScript support, the rest didn't change much). Let me know if you notice any problem with any of the packages.

Note that the Windows/MinGW version of sswf 1.7.3 does not include the new tools jpg2swf and asc. Of course, you should be able to recompile them. The MacOS/X version is missing the new libraries as is the IRIX version (why isn't anyone tell me these things?! 8-) I will try to put 1.7.4 up in order to fix all these problems very soon. And as a tiny surprise, a very small extra support for version 8... Really nothing fancy yet.

### BIG NEWS!

Version 1.7.3-beta is now available on SourceForge. It compiles on all five platforms I have access to. I'm uploading all the modules for you as I'm writing this paragraph. These modules are final for 1.7.3. And this version includes an ECMAScript v4 compliant ActionScript lexer, compiler, optimizer (level 1 only) and assembler. You can now write your ActionScripts directly in your SSWF script files and the SSWF compiler does the rest for you! (well... nearly... 8-} once you've successfully done the setup that is.) Note that for those of you who like to download it all, this version, with all the binaries, is 143,851,520 bytes. But please, got at it, so we pass the limit of 20,000 downloads on SourceForge! 8-)

Why is version 1.7.3 a beta? Well... The addition of the ActionScript compiler will most certainly cause some problems and until I can tell that not too many people are complaining, then I can upload version 1.7.4 and not call it a beta. Thought for me it looks like it is working great, I'm not a good tester (mainly cuz I don't have the time) and thus I can't tell for sure that this is fully a functional version. Don't hesitate to tell me if something you were using in earlier versions broke in this version.

ActionScript sample... I started to work some on a movie to actually test the output of the compiler. This creates a text field and put the result of a computation in it. This works under Linux (didn't test on any other platform.) I'm thinking to enhance that test so you can have many different tests which can be run from a single movie. This could be used to ensure that all the functions available are compiling properly with newer version. A compiler is always something particularly sensitive!

The version 1.7.3 is available as a beta version for now. It fixes some internationalization problems in ft2sswf and the Edit Text tag. Also the configure script can properly be used from another directory. Finally, for those who are looking into having an ActionScript compiler in SSWF, I started on it. You now have the parser, an optimizer, a complier and an assembler. The compiler and assembler can now parse a class a create a definition in Flash binary code. So now nearly everything is implemented, including many extensions nobody needs. And it has been tested (most of it) so you should be able to play around with it without too much surprises. This is still a beta version. I will very soon (well... I missed the last weekend of October... and I still want to implement the rest parameter, the function get/set and package implementation features which currently aren't available) put it up on SourceForge as version 1.7.3-beta. Once most of the bugs are out, I will release 1.7.4. I count on you guys to report all the problems you are having. But please, look at the doc. first, many things are just not supported (yet) and thus you won't have to report these.

I found the bug with the sound on Mac OS/X. I would think that bug was the same on SGI IRIX. The bit rate of a sound effect was being swapped as a short instead of an integer (16 vs 32 bits). Also, the font offsets would not be swapped at all. This one would actually make the Macromedia player crash. Now it works as expected (tested on Mac OS/X and Linux on Power.) Yes, this means you can now use fonts under SGIs, Macs and Linux on Power.

Added an RPM for Linux on Power systems from IBM. This means we could easilly have a SuSE version too, or maybe the existing i486 RPM would work as is on SuSE? If you have tried and it worked, let me know! Thanks. 8-)

Some progress was made in offering the sample 'run' scripts to work after a 'make install'. I first wrote those for myself to test the software before to post it and thus they were all specific to my development environment instead. This is not really working for the makefile's yet.

Wow! 8-) I asked for a Debian packager and I found someone kind enough to work on that. I then also had someone offering me to do a Slackware package. These are not official yet, thought the Slackware package seems to work fine already. The Debian has to be debugged a bit more. So version 1.7.2 will include loads of new stuff! More about this soon.

Big news: MP3 is supported in version 1.7.2 (still only a beta, go to ftp://ftp.m2osw.com/sswf/beta to get it -- WARNING: only MS-Windows and Linux binaries include these changes). There is a first version which supports loading an MP3 which is kept compressed in your final Flash animation. It supports MPEG version 1.0 and 2.0 with Layer 3 and it can be mono or stereo, compressed with or without CRC checks and can be sampled at 11025, 22050 or 44100 Hz. Special thanks to Steve Crook who actually sent me a version of the libsswf_tag_sound.c++ file including changes to support MP3.
Note for MS-Windows users: the run.bat file still references anim.[s]swf instead of lanuit.[s]swf.

A few more words about 1.7.2. It works under 64 bits AMD. I suspect it will work on the 64 bits INTEL too. Also, for developers who need to check in the code, I broke down the libsswf_tags.c++ file in many files. One per tag and some others for specialized code such as the actions. The code is the same, just very much broken up. One person complained about a few compile problems with Visual C++. I fixed the Rectangle problem by renaming it SRectangle. There was also some static const which cl doesn't like, I replaced them with an enumeration.

Quick update for those who like to live on the edge. You can now download version 1.7.2 (that's still a beta version). It includes a few changes to the makefiles, two new options to the sswf tool and more. The configure script can now be run from another directory (i.e. mkdir sswf-obj; cd sswf-obj; <path to sswf-src>/configure; make all; su + password; make install). This is neat if you don't want to destroy your source directories. That's really cool, I think. Enjoy.

For 2005, my goal is to add a complete compiler for the action script. This is actually based on Java and should not be too complicated (I don't need to generate assembly code, just action script byte codes which is a lot easier! that's like writing a C compiler and stopping at the P-Code.)

IBM provided a little help for SSWF to be ported to Linux on Power. There should some time in 2005 be a version available which will be compatible on that version of Linux (a PPC system). I will see if I can even provide a compiled version of it. The only change in the port of version 1.6.3 was adding the math library for the swf_dump tool (-lm) in the Makefile.am. I will see later if that is enough for versions 1.7.x.

Mainly bug fixes for MS-Windows, there is version 1.7.1 of SSWF. If you have 1.7.0 and are running under Linux or iMac, there isn't really anything more for you in 1.7.1. If you have MS-Windows, this version includes the proper installer and the fix in regard to the iconv static linking. (The MinGW version is actually not changed either).

Ooops! There is a problem with the win32 version of 1.7.0 in regard to the iconv library. Now I have found the solution, the include I have to use it "iconv.h.static" whenever I want to create the static version of sswf. This is now done and it works. You will get the changes in 1.7.1. In the meantime, I put the working executable on SourceForge as:

> `sswf-1.7.0-bin-win32-i686-noiconv.exe.zip`

Let me know if you have any more problems with that version.

That's it. I'm releasing version 1.7.0 as the current version. It includes a lot of changes (see the CHANGES.txt file or click on the CHANGES link on the right) and especially many standard installation packages for Linux, Mac OS/X and IRIX. And yes... it knows about the new Flash version 7 tags.

NOTICE: our FTP server has had some trouble around Nov. 1st, 2004 for about a week. These should now all have been fixed. If you tried to get the beta version or some older versions, you may want to give it a try again. Note that you can always get the files from SourceForge.net.

For those interested, I started to work on an RPM and a Mac OS/X version. These will soon be available. You can already download the existing beta, thought not yet official versions on the m2osw.com FTP web site.

Some news: version 1.7.0 is already available; this is only on the ftp://ftp.m2osw.com FTP site as a beta version. It includes all the new tags and actions defined in Flash version 7. It is untested so it may just not work at all. Let me know if you have problems and especially if you know how to fix them 9-). I will be testing in the next little bit and will update the documentations according to my discoveries. Also, one big fix already available in 1.7.0: the sound effects resampling was broken in many ways. This is now fixed and you should be able to successfully use many different types of WAVE files with SSWF.

After a bug report by Ivor, I fixed many problems available in version 1.6.3 (and of course 1.7.0) in regard to sound effects being resampled automatically by SSWF. There were many problems in that function!

Note: you can find the most recent page at http://sswf.m2osw.com. The page sswf.sourceforge.net is not updated as often.

New to SSWF? Ray Gardener is working on a tutorial just for you! You will be able to learn how to use SSWF following his example going from a very simple box to complex animations using action scripts. You will find his page here: SSWF Tutorial.

What will you get in V1.6.2? Many bug fixes as usual, but also additions such as full morph functionality, new samples (the sun flower, USA flag, morph) and direct control of the skew when positioning objects on the screen. And of course, the tutorial is included in the documentation package.

Voila. The changes to V1.6.x is mostly done. I'm still working on it, but version 1.6.1 is much less of a Beta than 1.6.0. It is available on SourceForge as usual and now it is also on the FTP site of Made to Order Software Corp. (you may also have a beta version available.)

Ooops! Looks like I forgot to mention V1.5.1 here... 8^) Anyway we now have V1.6.0-beta available. I only published the source code since it's really a beta version. The source is totally functional (coming from V1.5.1 with only a few minor bug fixes and one enhancement -- SSWF can load JPEG images) but the new structure may cause some problems since I didn't check everything yet. Only one makefile and that's only compatible with amake under Linux at this time. If you think you want the fixes and/or the enhancement, then take this version and copy the source files to your V1.5.1 tree so you can compile for sure under MS-Windows, MacOS/X or IRIX.

One important point about V1.6.0-beta: it is required to run the new SWF plugin in the LiVES project. That project lets you create movies which you can now publish on the web as Flash movies. There is a real need for enhancement in this area which I hope to do in the next month or two. More info soon I hope.

Finally, there is version V1.5.0. This is actually 1.4.4 which I renumbered 1.5.0 since it includes support for two new tags. (TagDefineSound and TagStartSound). I'm not sure if I properly documented the use of the sounds... so at this time you can use the following SSWF code to generate a sound effect in a flash movie:

    sequence "main" {
    	sound "snd" {
    		"my sound.wav";
    		format: "uncompressed";
    	};
    	sound info {
    		id: snd;
    		loop: 5;
    	};
    	show frame;
    };

Only the "uncompressed format is currently understood. I hope to find some time to add ADPCM and MP3. On the other hand, you can include any sound effect (whatever speed, stero/mono, 8 or 16 bits). Thus you should have no problems including most of your sound effects. Important: the input sound must be in a WAV file (RIFF) and it can't be compressed.

The next version (V2.0.0) will include the new lexical I've been working on. It enables full multi-language support (as long as you have an iconv library installed). Also, I will move all the files around to have a directory of libraries, the sswf tool and other tools, docs, etc. each one in its own directory. It will look much cleaner.

I added a LIVE sample of Halk's temperature. It is complete with the SSWF code to generate the graph (but not all the scripts to make it all work, you've got to do some work too, right?).

Chris Dolan made a port for Mac OS/X! It is part of v1.4.3. So, Mac users, get ready to rock!!! There is a Fink version in progress, it will be very easy to install in your Mac OS/X environment.

I'm looking for someone who would like to help in writing a tutorial for the sswf tool and library. Anyone available? That's many hours of work... that I don't have.

I started on a test suite. This will (1) prevent problems such as the COUNT: label for the Show Frame which disappeared in one version and (2) ensure that everything works the way it is supposed to. I already used it to test the new fonts. It isn't yet included anywhere. It will certainly be a seperate package so only developers can download it (and these people who want even more samples! 8-).

To come (soon? hmmm... still thinking about it 8-) a large list of fonts in SSWF format to download and use in your SWF movies.

### What is SSWF?

The SSWF project includes several utilities to work on Flash movies. The main one is certainly the library which enables a programmer to easilly create an SWF file. The sswf tool can also be used to do just that: create a movie from a script. The interest is to have the movie created dynamically with data which are available at the time of creation. This is of course only useful for web sites which are CGI enabled. Though that's was the main aim, the scripting language can also be used to generate static SWF files for your static web sites.

A great help would come from a tool which would be used to draw shapes and save them in the format understandable by sswf (a list of points, fill styles and a shape). If someone has plenty of time and wants to join...

### Where can I get SSWF?

Please, first make sure to read about the requirements below so you don't download something you wouldn't be able to use.

It is now possible to download the files from our FTP server at Made to Order Software Corp. Now, I added a link named sf.net to let you download the files from SourceForge.net. This can be faster if you are not in the US.

The following table gives you a direct access to the current version of the SSWF modules. You can also go to ftp://ftp.m2osw.com/sswf to download older versions or the beta version.

You can get some binaries specific to your platform from other sites. Gentoo and FreeBSD have their own ports.

IMPORTANT: the beta version will always include the proper binaries for Linux. However, the IRIX, Mac OS/X and Microsoft Windows binary modules may not always be up to date. This is because I don't always turn on these computers when I generate the beta version (because it takes forever).

<DOWNLOAD>

You can also download all the packages files on the following SourceForge page: http://sourceforge.net/projects/sswf | Button sample

### Requirements

This library was developped and is running under Linux RedHat v6.2. Now it also works under RedHat v9.0, MinGW, IRIX, Mac OS/X, LinuxOnPower, slackware, Debian and all sorts of Unix platforms. Note that you at least need to have a working yacc (bison would be good) to compile the entire system.

#### Linux

At this time you will need the following items to compile this library under Linux:

- gcc/g++ v2.91.66 or better
- z library v1.1.3 (libz)
- jpeg library v62 (libjpeg)
- amake v2.10.9 or GNUmake v3.79.1
- flex v2.5.4 (prior version 1.7.1)
- bison v1.28
- freetype v2.1.2 (for ft2sswf only)
- iconv v2.3.2 (for internationalization)
- freetype v2.1.2

It is likely to work with older versions but it wasn't tested. The freetype library v1.x won't work. You can install v2.1.2 on your Linux RedHat 8.x and it will work. Note that v2.0.x doesn't include some functions I use so you will need to upgrade on your RedHat v7.1 if you want to run ft2sswf.

#### MinGW

The following is what you need to compile under MinGW:

- MinGW 2.0 (may work with v1.x)
- z library v1.1.4 (libz)
- jpeg library v6b (libjpeg)
- amake v2.10.10 (won't work with v2.10.9)
- flex v2.5.4a (prior version 1.7.1)
- bison v1.35-2
- gettext v0.10.40 (required by bison)
- iconv v1.7 (required by bison & soon by ft2sswf)
- freetype v2.1.2

The ft2sswf tool is available in SSWF v1.3.5+.

#### IRIX

The following is what you need to compile under IRIX 6.5:

- gcc/g++ v3.0.4
- z library v1.1.3 (libz)
- jpeg library v6b (libjpeg)
- amake v2.10.11
- flex v2.5.4 (prior version 1.7.1)
- bison v1.25
- iconv v1.7
- freetype v2.1.2 (only for ft2sswf)

Note that I didn't work on the ft2sswf tool yet. You can find the freeware tools on the SGI freeware area as indicated in the Download links on this page.

#### Mac OS/X

For Mac OS/X you need to have fink in order to have all the tools and libraries to compile and link SSWF. The easiest is to get the info file and do the following:

    	fink -k rebuild sswf-1.7.3-2

That works after you put the info file at the right place.

    	/sw/fink/dists/local/main/finkinfo/sswf-1.7.3-2.info

If you already downloaded the source and documentation files (-src and -doc files), then put them in /sw/src

Note that the dynamic library libsswf_asas.dylib has some undefined symbols (it depends on the libsswf.dylib and libsswf_as.dylib). This means dynamic versions can only be used on Mac OS/X 10.3 and over.

#### LinuxOnPower

At this time, it works on all versions of LinuxOnPower. Just install the RPM.

You may need to recompile from Source. In this case, do so. There is a configure script so that easy (./configure + make + sudo make install)

#### Win32 with cl (Microsoft C/C++ compiler)

I do not maintain this very well, but I usually try to make sure that all my source do compile with cl.

At time of writing, it was compiling with version 13.10.3077 the cl. I didn't try linking because there are many problems with finding the proper libraries. Good luck!

Note that you will need to have some of the libraries from MinGW to finilize the lnk.

### FAQ

I got the IRIX, MacOS/X, LinuxOnPower version of SSWF and it crashes?

> Though I'd like to build the samples on these systems, I can't directly compare the results with the Linux or Windows versions. This is because the `double` are more precise on MIPS and PPC. Thus the results are slightly different (+/-1 for many coordinates). To compare such files it would require to know that these entries are coordinates and allow for a +/-1 difference. Thus, the result is that some of the code may not be correct (bad alignment or 32/64 bits incompatibilities, most probably, endian problem, possibly). The first really working IRIX version of sswf is v1.4.2. The Mac OS/X and LinuxOnPower modules did benefit from the IRIX package. Note that the library went through changes for endianess and 64 bits incompatibities. swf_dump and ft2sswf weren't throughly tested yet and may both be bogus on these systems... So far I didn't get too many emails about such problems though.

My font doesn't seem to be selected?!?

> The `text setup { ... }` selection will always be taken in account in a `text` entry. However, to be taken in account in an `edit text`, you must use a flag called outline and turn it ON as follow: `outline: true;`

I created a filled shape. My movie plays fine, but once in a while it crashes. Any idea?

> For some reasons, Macromedia isn't capable of closing their shapes. In other words, you have to do that for them. At this time, the library doesn't do it, though, that's most probably what I will end-up doing to save time to every one. When you use the SSWF tool, you can use the "CLOSE: 0, 0" flag as the last entry of your points or edges. This will ensure an enclosed shape and it won't crash anymore (watch out, if you have many shapes, you need to close them all to avoid all the crashes).

Where did the Update paragraph go?

> I decided to put the CHANGES.html file in the web page so you could read the progress with more details right away. Just click on the link in this FAQ or in the list of links on the right.

## Links

References

Alex's reference of
the SWF file format

The SSWF library
(the old version)

SSWF reference

ActionScript in SSWF

ActionScript Compiler
(low level information)

SSWF tutorials

SSWF Notes

SSWF Changes

SSWF Forum

Downloads

Download SSWF
from SourceForge

Get SSWF beta

SSWF on Gentoo

SSWF on Freshports

SSWF on Fink

SSWF on rpmfind

SSWF on GNUWin32

SSWF in Japan

Download amake

MinGW System

GNU Win32

SGI Freeware

Samples

SSWF sample

Button sample

New sample

Scroller sample

Sun Flower sample

Morph sample

Live Temperature

Manual Pages

sswf

swf_dump

ft2sswf

jpg2swf

SSWF in Encyclopedia

What-means

WIKIPEDIA

Javapedia

CodeBoy

SSWF in the Press

Software 2.0 Extra
(Polish)

Software 2.0 Extra
(Spanish)

Software 2.0 Extra
(French)

Software 2.0 Extra
(German)

Software 2.0 Extra
(English)

Flash Virus?!

Flash gets its very own virus

Free Fonts

Fonts by
Ray Larabie

Projects using SSWF

LiVES

Animate

Veejay

Other projects

Ming

Flasm

swfdec

swfsource

GameSWF

Bukoo

SWFTools

AutoTrace

MTASC

GplFlash

Gnash

JavaSWF

SE|PY

swfmill

Other References

Scan Conversion
How to draw
polygons

Polygon to Triangles

Other Samples

Drawing in Flash

By the same author

Solitaire

Alexis' FTP

EDLL (Enhanced Dynamic Library Loading under MinGW for MS-Windows)

Macromedia & adobe

Macromedia's Reference

Adobe Labs

Flash 8 LiveDocs

This page was last modified on <DATE>.

Copyright (c) 2002-2007 Made to Order Software Corp.