My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Fla2Swf  
fla2swf - command line .fla to .swf publishing utility.
Updated Oct 4, 2010 by pacha.sh...@gmail.com

Intro

fla2swf is a command line utility written in PHP which can be used in a batch mode for publishing .fla files to .swf. It consists of the client and server parts. The cool thing behind this utility is the fact the client can be run on the box without Flash IDE installed(even on the *nix box). Of course, you will need the server to be run on the workstation with the Flash authoring environment installed.

How it works

This is what fla2swf is doing behind the scenes:

  • fla2swf client passes all publishing requests to fla2swfd server and writes back the results. The client accepts paths to .fla files and corresponding paths to resulting .swf files. Internally fla2swf sends .fla files to the server as binary blobs, it accepts the binary blobs of the resulting .swf files and writes them onto the disk. fla2swf is a cross-platform client which was tested both on *nix and Windows.
  • fla2swfd server accepts series of .fla files as binary blobs. It creates an appropriate jsfl script for publishing .fla files into .swf, executes it and returns back binary blobs of the published .swf files. Due to tight integration with the Flash IDE fla2swfd can be run on Windows only(though it should work on Mac as well with minor changes)

Usage

After unzipping the archive, enter the fla2swf directory and invoke the usage help by simply running the script:

$ php fla2swf.php
No fla/swf files specified
Usage:
  fla2swf.php [OPTIONS] <fla_file> <swf_file> [<fla2_file> <swf2_file>, ...]
 
Options:
  --host       - fla2swfd host(by default tries the first ip returned from ipconfig)
  --port        - fla2swfd port(8976 by default)
  --force=1   - force the publish process(i.e don't stop the publishing if the last
                    modification time of the resulting .swf file is newer than of the
                    source .fla file)
  --noauto=1  - don't try to spawn the fla2swfd daemon automatically
 
Arguments:
  <fla_file> <swf_file> - pairs of .fla => .swf files. Amount of such pairs is unlimited

Typical usage:

$ php fla2swf.php hud.fla hud.swf menu.fla menu.swf avatar.fla avatar.swf
start  "fcshd"  /MIN php fla2swfd.php --host=127.0.0.1 --port=8976
Connecting to '127.0.0.1' at port '8976'...
Sending request...
Waiting for reply...
hud.fla(53601 bytes) -> hud.swf(69568 bytes)
menu.fla(54302 bytes) -> menu.swf(73566 bytes)
avatar.fla(67642 bytes) -> avatar.swf(89562 bytes)

By default if fla2swf is run on the Windows host and if the server host is not specified or matches the client host, fla2swf spawns the server automatically. Once the server is running you should see the fla2swfd window running minimized.


Sign in to add a comment
Powered by Google Project Hosting