Posts tagged swf
Converting GIF to SWF using Flash CS4
Dec 16th
A typical ballache… You want to use one of the cool loaders from http://ajaxload.info/ in your Flash/Flex apps, but it only generates a GIF file… So you’ll scour the net for a GIF2SWF application and you’ll undoubtedly come across a few, but you don’t have to look any further than Flash CS4 – surprisingly!
All you have to do is open a GIF file in Flash CS4 and it’ll automatically pull it apart and convert it to frames, which can then be converted to a SWF file
Hope it helps you at some point!
Using SWFTools on Linux
Jan 27th
SWFTools is a fantastic library of SWF manipulation utilities. It contains the following packages:
- PDF2SWF A PDF to SWF Converter. Generates one frame per page. Enables you to have fully formatted text, including tables, formulas etc. inside your Flash Movie. It’s based on the xpdf PDF parser from Derek B. Noonburg.
- SWFCombine A tool for inserting SWFs into Wrapper SWFs. (Templates) E.g. for including the pdf2swf SWFs in some sort of Browsing-SWF.
- SWFStrings Scans SWFs for text data.
- SWFDump Prints out various informations about SWFs.
- JPEG2SWF Takes one or more JPEG pictures and generates a SWF slideshow.
- PNG2SWF Like JPEG2SWF, only for PNGs.
- GIF2SWF Converts GIFs to SWF. Also able to handle animated gifs.
- WAV2SWF Converts WAV audio files to SWFs, using the L.A.M.E. MP3 encoder library.
- AVI2SWF Converts AVI animation files to SWF. It supports Flash MX H.263 compression. Some examples can be found at examples.html.
- Font2SWF Converts font files (TTF, Type1) to SWF.
- SWFBBox Allows to readjust SWF bounding boxes.
- SWFC A tool for creating SWF files from simple script files.
- SWFExtract Allows to extract Movieclips, Sounds, Images etc. from SWF files.
- RFXSWF Library A fully featured library which can be used for standalone SWF generation. Includes support for Bitmaps, Buttons, Shapes, Text, Fonts, Sound etc. It also has support for ActionScript using the Ming ActionCompiler.
You can download the tarball from their site (http://www.swftools.org) or using the Synaptic Package Manager on your Linux distro. The installation is fairly straightforward, so i’ll just skip to using the package.
All the exercise files i will be using in this post are available here.
The tools i will be highlighting are:
- PDF2SWF
- SWFDump
PDF2SWF
This is probably the most useful tool in the entire package. As the name implies, it will convert the inputted PDF and convert it into a SWF. Refer to the PDF2SWF.pdf and PDF2SWF.swf files in the exercise files.
You can find the manual for PDF2SWF here.
Usage: pdf2swf [options] input-file.pdf -o output-file.swf
Useful arguments:
- -P – Decrypt the SWF with a password
- -p – Pages to convert
- -T – Set the Flash Player version
SWFDump
This is a very neat tool! It can tell you a whole lot about your SWF, such as the width, height, fonts, and it can even generate (X)HTML code for you for embedding your SWF.
The documentation for this tool can be found here.
This is a very interesting package for all of the experimenting Flash/Flex developers working on or with Linux. The package is available for a plethora of operating systems though, but it’s always cooler on Linux