Output
Command line
Phoenix can render and convert documents without showing a window, so you can script batch exports and render on a build machine.
On Windows, the program is Phoenix.exe in the folder Phoenix was installed to. On macOS, it is /Applications/Phoenix.app/Contents/MacOS/Phoenix. The examples below just say Phoenix.
Open a file
Phoenix drawing.fla
Starts Phoenix with the file open, the same as dropping it on the program.
Phoenix --view movie.swf
Shows the file in a player window of its own, without the editor: a quick viewer. Phoenix documents, FLA and XFL files and SWF movies play as Test Movie plays them, scripts and sound included, with a time slider; SVG, Illustrator (.ai), EPS, PDF and Photoshop files and images show on a stage fitted to the art. Only the stage is drawn. On Windows, Phoenix adds View in Phoenix to the right-click menu of these files and Phoenix Viewer under Open with, so any of them opens in the viewer from File Explorer. See Phoenix Viewer and Open with.
Phoenix --mcp
Lets an AI assistant work with Phoenix over the Model Context Protocol, on standard input and output; the assistant starts Phoenix this way. If a Phoenix already running lets assistants connect, this passes the messages to it instead of opening another window. See AI assistants.
Phoenix --tutorial 01-first-animation
Starts Phoenix with a lesson running, by its folder name. See Interactive tutorials.
Phoenix tidy.jsfl
Phoenix run-script check.jsfl shot_010.fla [--timeout SECONDS]
Runs a JSFL or Python (.py) script: in the Phoenix already open, or with no window on the documents named, printing what it traces and exiting with 1 when it fails. See Scripting with JSFL and Python.
List the commands
Phoenix help
Prints the commands below and their options. Phoenix --help does the same.
Render frames
Phoenix render shot.fla --range 1-240 --out frames/
Phoenix render shot.fla --out shot.mp4 --size 1920x1080
Phoenix render shot.fla --range 12 --out still/ --transparent
Phoenix render shot.fla --out comp/shot.mov --prores4444 --transparent
Phoenix render shot.fla --out vector/shot.svg --link-images
Phoenix render lower-third.fla --data people.csv --out renders/ --format mp4
--data renders the document once for each row of a CSV file into the --out folder, the template fields of its symbols filled from the row: the first row names the fields. A file column names each output; without one they are numbered. --format is mp4 (the default), mov, gif or png for a numbered sequence a row.
Renders without a window, for render nodes and pipelines. The --out name decides what you get: a folder gets a numbered PNG sequence named after the document, and a name ending in .png a numbered sequence with that name; .mp4 or .mov makes a video (H.264 with AAC sound unless you ask for ProRes), .gif an animated GIF, .svg a numbered SVG sequence, and .swf an SWF movie. Without --out, frames go to a folder next to the document called name_frames. Every frame of the scene the document opens on is rendered at the stage's size unless you say otherwise. An option Phoenix does not know stops the render with an error.
| Option | Meaning |
|---|---|
--range A-B | The frames to render, counting from 1, both ends included. One number renders one frame. |
--size WxH | The output size in pixels. |
--transparent | No stage color behind the art (PNG, GIF, SVG and ProRes 4444). |
--safe-zones | Draws the document's safe zones and aspect-ratio frames over every frame, for a review copy. |
--no-camera | Render the stage as drawn rather than through the scene's camera. |
--no-audio | A video without its soundtrack. |
--per-layer | A PNG sequence for each layer. |
--layers A,B | With --per-layer, only the layers named. |
--prores, --prores4444 | A .mov in ProRes 422 HQ, or ProRes 4444 which keeps transparency, rather than H.264. The sound is uncompressed PCM. |
--everything | All the artwork on the frames, the pasteboard too, rather than the stage. |
--scene NAME | The scene of that name, rather than the one the document opens on. |
--all-scenes | Every scene, one after another, into one output. |
--each-scene | Every scene to its own output, named after the scene. |
--colors N, --dither | For a GIF: at most N colors a frame, and dithered. |
--link-images | For SVG: each bitmap written once beside the SVGs rather than inside each. |
--passes | Line, color and matte PNG sequences for compositing, in the --out folder. |
--exr | One multi-layer OpenEXR a frame, in the --out folder: the picture, with the line, color and matte passes as layers. |
Check and repair a document
Phoenix doctor shot.fla
Phoenix doctor RECOVER_shot.fla --repair shot_fixed.fla
Phoenix doctor shot.fla --json
Looks for damage: parts of the file that are missing or not well-formed, keyframes out of order or overlapping, spans of no length, instances of symbols the library does not have, symbols that contain themselves, broken folder and mask links, sounds that are not in the library. With --repair, Phoenix fixes what it can and writes the result to a new file; a missing symbol gets an empty one of the same name standing in, so nothing that uses it is lost.
A file too damaged to open (a save cut short, a RECOVER_ file) is salvaged part by part, and a symbol whose part was cut off is replaced by an empty one so the rest opens. --json prints the report as JSON, for scripts. The exit code is 2 when errors remain. In Phoenix, File > Check Document does the same for the open document.
Compare two versions
Phoenix diff shot_v1.fla shot_v2.fla --out changes/
Lists what changed, part by part (the scenes, each symbol, each bitmap and sound, compared as they would be saved), then renders sample frames of both and compares them pixel by pixel. With --out, each frame that draws differently is saved as an image of before, after and the changes in red. --samples N sets how many frames are compared (12 by default). The exit code is 2 when the versions differ. In Phoenix, File > Compare With shows the same report.
Split an episode into shots
Phoenix shots episode.fla --by label --out shots/
Phoenix shots episode.fla --by scene --format xfl
Phoenix shots episode.fla --by camera
Writes a file per shot. With --by label (the default), each frame label starts a shot and gives it its name; frames before the first label become a shot of their own. --by scene makes one file per scene, named after it. --by camera cuts where the scene's camera jumps: at each camera keyframe that is not tweened into.
Each shot starts at frame 1. A tween that runs across a cut is baked into a keyframe per frame on the shot's side, so the shot plays exactly as it did in the episode, and the camera is keyed where it stood at each cut. Library items a shot does not use are left out of its file. --format chooses fla (the default), phx or xfl. Without --out, the shots go in a folder beside the episode named after it with _shots. In Phoenix, File > Export > Export Shots does the same for the saved episode.
Run something over a folder
Phoenix batch episode/ --doctor
Phoenix batch episode/ --convert phx --out converted/
Phoenix batch episode/ --render --out renders/
Phoenix batch episode/ --update-links --save
Phoenix batch episode/ --python fix_names.py --save
Phoenix batch --jsfl rename_layers.jsfl episode/ extra/sh090.fla --save
Runs one operation on every .fla and .phx in the folder (add --recursive for subfolders). --doctor checks each; with --save or --out it also repairs, in place or to a copy. --convert writes each as fla, phx or xfl, beside it or in --out. --render renders each to a PNG sequence, in a folder named after it. --update-links brings each document's linked symbols up to date from their master files, and --save writes the documents back. --jsfl and --python run a script on each document in turn, opened alone, with fl.getDocumentDOM() giving it, as Commands scripts see it; they also take single files. With --save, what the script changed is written back to the document; with --out, to a copy. A script that stops with an error leaves its document alone. Set PHOENIX_PYTHON to choose the Python interpreter.
--jsfl runs a JSFL script on each document in turn, as run-script does: give it documents, folders, or both. Each document is opened on its own, the script runs with it as the current document, and it is closed before the next. What the script traces goes to standard output, under a == document line for each; errors go to standard error. With --save, what the script changed is written back to the document; with --out, a copy goes into that folder. A document whose script fails is not saved. --timeout SECONDS stops a script that runs too long, as for run-script.
At the end, Phoenix says how many documents there were and how many had problems; the exit code is 2 if any did.
Update linked assets
Phoenix links shots/sh010.fla
Phoenix links shots/sh010.fla --update --save
Lists the symbols in a document that are linked to a master file, each with its master. --update brings them up to date from their masters, along with the symbols, bitmaps and sounds they use; --save writes the document back. To update every shot in a folder, use Phoenix batch folder --update-links --save. The exit code is 2 when a link could not be updated.
List keyboard shortcuts
Phoenix shortcuts
Phoenix shortcuts --defaults
Prints every command and tool with its key, one to a line, separated by a tab: the keys of the set in use, or with --defaults, Phoenix's own. See Keyboard shortcuts to change them.
Check the tutorials
Phoenix lessons
Phoenix lessons --check
Lists the interactive tutorials: each lesson's folder name, title and number of steps. With --check, Phoenix opens its window out of sight and finds every tool, menu command, panel and control the lessons point at, and every tool and command they wait for, printing any it cannot find. It exits with 2 when something is missing, so a studio can check its own lessons after an update. Lessons in the folder named by PHOENIX_TUTORIALS_DIR are checked too, which helps while writing one.
Play a movie's scripts
Phoenix play game.fla
Phoenix play game.fla --frames 300 --tree --click-all
Plays the movie with no window, as Test Movie does, scripts and all, and prints what its scripts trace and the errors they stop on. --frames sets how many frames it plays (120 by default). --tree lists the movie clips and buttons on the stage then, with the scripts each has. --click-all then clicks each button in turn, playing a few frames after each. --image out.png saves the frame it ends on as Test Movie shows it. It exits with 1 when a script stopped on an error, so a folder of games can be checked in a batch.
Measure performance
Phoenix benchmark episode.fla
Phoenix benchmark episode.fla --frames 120 --json episode.phoenix.json
Phoenix benchmark episode.fla --against episode.animate.json
Times each step of working with a document: reading it, opening it in the editor, drawing its frames at the stage's size (first with nothing cached, then again cached, with the frame rate that gives), saving it as FLA, PHX and XFL, and reopening the PHX. It also reports peak memory. --frames sets how many frames are drawn (240 by default). --json writes the numbers to a file, to track them over time or between machines. Use a Release build for numbers worth comparing.
To compare with an editor that runs JSFL scripts, run docs/benchmark.jsfl in it on the same file: it opens the file, exports every frame as a PNG and saves a copy, timing each, and writes file.animate.json beside it. --against that file prints both sets of times side by side.
Export a movie
Phoenix --export-movie scene.fla out.mp4
Phoenix --export-movie scene.fla frames.png
Phoenix --export-movie scene.fla loop.gif
Phoenix --export-movie scene.fla frames.svg
Phoenix --export-movie scene.fla soundtrack.wav
Renders every frame of the scene the document opens on, at the stage's size, and exits. Phoenix render does the same with more options. The output name decides the format:
| Output ends in | Makes |
|---|---|
.png | A PNG sequence: frames0001.png, frames0002.png and so on |
.gif | An animated GIF |
.svg | An SVG sequence: frames0001.svg, frames0002.svg and so on |
.wav | The soundtrack |
| anything else | H.264 video with AAC sound, for example .mp4 or .mov |
Add --per-layer after the output name to write a separate PNG sequence for each layer:
Phoenix --export-movie scene.fla layers.png --per-layer
Export an image
Phoenix --export-image scene.fla poster.png --frame 48 --size 1920x1080 --matte transparent
Phoenix --export-image logo.eps logo.png
The source can also be artwork: an SVG, Illustrator, EPS, PDF or Photoshop file is drawn on a stage fitted to it, a quick way to turn vector art into an image.
| Option | Meaning |
|---|---|
--frame N | The frame to render, counting from 1. The default is the first frame. |
--size WxH | The output size in pixels. |
--matte transparent or --matte COLOR | The background. A color can be a name or a hex value such as #202020. |
--quality 0-100 | JPEG quality. |
--colors N | A palette of at most N colors: an 8-bit PNG, or a GIF's color count. |
--dither | Dither the palette's colors. |
The format comes from the output name: .png, .jpg or .gif.
Convert between formats
Phoenix --convert scene.fla scene.phx
Phoenix --convert scene.phx scene.fla
Phoenix --convert scene.fla scene_xfl
Converts between Phoenix documents, FLA files and XFL folders. A name ending in .phx or .fla chooses that format; any other name makes an XFL folder. If something in the document cannot be written to the chosen format, Phoenix lists it after Not written:.
Phoenix --convert scene.phx for-studio.fla --for-other-apps
With --for-other-apps, the copy is written as writes it: behaviors, shape operators and letter animators baked into keyframes, track mattes, adjustment layers and template values made into what any app that opens FLA files shows.
Inspect a Phoenix document
Phoenix --phx-dump scene.phx
Prints the parts of a .phx file as text, which is useful when reporting a problem with a file.
Check that a document saves faithfully
Phoenix --roundtrip scene.fla check/
Phoenix --roundtrip scene.fla check/ 12
Saves the document as FLA and as PHX in the folder, opens each copy again, and compares sample frames (5 by default, or the number given) with the original's, pixel by pixel. It prints one line of JSON saying how many pixels changed in each copy and on which frames, and saves images of the original, the copy and the differences for each frame that differs. The exit code is 2 when a copy draws differently.
Running on a machine without a display
Exports never show a window. On Linux, the named commands (render, doctor, diff, batch and the others above) draw offscreen by themselves when there is no display. Elsewhere, or for the older options, set the environment variable QT_QPA_PLATFORM=offscreen so Phoenix doesn't look for one:
QT_QPA_PLATFORM=offscreen Phoenix --export-movie scene.fla out.mp4
On Windows, --export-movie, --export-image and --roundtrip find the system fonts by themselves in this mode, so text renders normally.
Exit codes are 0 on success and non-zero on failure, with the reason printed, so scripts can stop on errors.