🌐 US-Proxy
id="body-softwares" class="foundation-grid action-show controller-softwares engine-home">

Inspiration

Flash Player reached its end of life on 31 December 2020. Years of games, lessons and animations were left as sealed .swf files that no browser opens, and for most of them the original source is gone. Emulators such as Ruffle can play a sealed file, and decompilers can export its pieces, but neither gives you a project you can open, read, change and build again. We wanted to raise the dead file as code: same class names, same packages, running in any modern browser, and honest about what did not come back.

What it does

Drop a .swf on the site (or run the command line). Seven stages run in order: unpack, convert, translate, emit, type check, verify, build. You get:

  • A TypeScript + Vite + PixiJS project. Your ActionScript 3 classes become TypeScript with the same names, packages and members, on top of a small Flash API layer (display list, sprites, movie clips, events) and a timeline player on PixiJS. ActionScript 1 and 2 are supported in part: each script becomes a TypeScript function run by a small AVM1 runtime.
  • A fidelity report. Two measured scores, never estimated: an overall match, where sampled frames of the output are rendered in headless Chromium and compared pixel by pixel with reference frames of the original, frame by frame; and a trace score, where a recorded input session is replayed and its trace() output compared line by line.
  • Original and converted, side by side. The original plays in Ruffle next to the converted build, so you can click both and compare.
  • "What stayed in the grave". Every feature that was not carried over is listed by name, with the places it occurs and the reason. A score below 100 always comes with its cause. A file that cannot be converted at all gets a clear outcome and reason instead of a blank page.
  • The source, browsable. The "Grimoire" tab shows every translated file; the whole project downloads as a zip.

The translation is deterministic: tokenizer, scanner and rewriter, with no language model in the loop. The same SWF gives byte-identical output on every run.

How we built it

The engine is TypeScript on Node.js. JPEXS FFDec runs as a separate process to unpack the SWF; our own code converts the timeline into scene JSON and draw data, translates ActionScript 3 to TypeScript, emits a Vite + PixiJS project from a template, type checks it, and verifies it against the original in headless Chromium with Playwright. The web app runs the same pipeline on a server and shows each stage live.

We built it spec-first in Kiro, and everything Kiro worked from is in the public repository under /.kiro:

  • Specs (.kiro/specs/): nine specs, each with requirements, a design and a task list, from the first vertical slice through translation, verification, robustness, ActionScript 1/2 and real games. Each finished task names its commits and tests.
  • Steering docs (.kiro/steering/): six files for product, tech, structure, the git workflow, Kiro tooling, and a page of verified Flash behaviour that loads only when runtime files are in play.
  • Hooks (.kiro/hooks/): three shell-command hooks. One blocks git commands that break our workflow, one regenerates a generated table and runs the sample licence checks after a write, and one checks commit hygiene after each spec task.
  • MCP server (mcp/swf-inspector/, registered in .kiro/settings/mcp.json): swf-inspector lets the agent look inside a SWF in one call (summary, tags, classes, class source, reference frames, fidelity summary), next to the Playwright MCP server for looking at results in a browser.
  • Sub-agent (.kiro/agents/fidelity-reviewer.md): a read-only reviewer agent that checks the work at checkpoints.
  • Property-based tests (fast-check) next to the unit tests (Vitest).

Challenges we ran into

  • Flash's behaviour is mostly undocumented. Event target rules, timeline order, masks and colour transforms had to match what Flash actually did, so the steering page of Flash behaviour records each rule with its evidence or marks it as not yet verified.
  • Real games are messy. Wrapper files that carry the real movie inside them, games that load side files, sitelocks that check the domain, obfuscated code, embedded child SWFs. Some we handle (wrappers, side files through a zip upload); others we name as limits rather than fake.
  • Measuring honestly. Our automated play check went through four versions because earlier ones missed start buttons at the edge of the stage and slow preloaders. Each time we re-measured the baseline with the same checker, so comparisons stay like for like. Timing under load also moved results, so test rounds run alone.
  • Determinism. Keeping the translation byte-identical on every run ruled out any guesswork step in the pipeline.

Accomplishments that we're proud of

  • 97 real Flash games tested. With the same automated play check (the game starts, draws, and its picture changes on its own or on input), 51 started and responded at the baseline and 85 do in round 11. That is a play check, not a claim that a game is fully playable, and the reports say where each one falls short.
  • Two open-source games convert and play in the browser from translated TypeScript (entity_game and spacer), and the MIT sample entity_game converts with a 100.00% overall match and 23 of 23 classes translated.
  • Honesty built in. Every result lists what stayed in the grave, by name, place and reason. Nothing is approximated silently.
  • ActionScript 1 and 2, a first stage: of the 727 Ruffle AVM1 tests that have a recorded trace, 186 reproduce it exactly.

What we learned

  • A spec with numbered requirements and a task list that names commits and tests keeps a long build honest: anyone can check what each task claims.
  • Steering docs that say "verified" or "not yet verified" for each Flash rule stop the same wrong assumption from coming back.
  • A small MCP server that answers "what is inside this SWF?" in one call saves far more time than it costs to write.
  • Measure the checker before trusting the score: a better play check changed the baseline as much as some fixes did.

What's next

What stayed in the grave, for now: morph shapes; most blend modes; filters (stored, not drawn); sound (calls are accepted and reported, nothing plays); dynamic text drawn in a browser font; and, for ActionScript 1/2, loadMovie and most flash.* classes. Child SWFs loaded at run time are named, not converted. Next we want to bring sound back, draw filters, convert embedded child SWFs, and widen ActionScript 1/2 coverage, measured on the same 97-game set.

Built With

Share this project:

Updates

Submission history