Introduction
Read, edit, write and render SWF files in pure .NET 10.
Read, edit and write SWF (Shockwave Flash) files — their AVM1 ActionScript, and render them to images or SVG — entirely in code, on .NET 10. Fast, allocation-light, and round-trips losslessly.
Getting started
Install the packages and load your first SWF.
SWF reading & writing
Disassemble a SWF into a mutable tag tree, edit it, assemble it back losslessly.
AVM1
Disassemble DoAction bytecode and evaluate data scripts to a typed value tree.
Serialization
Map AVM1 globals to your own types, System.Text.Json style.
Rendering
Render shapes, sprites and text to images and SVG via Skia.
Highlights
- Lossless round-trip — parse a real-world
.swfand re-assemble it without losing data; byte-identical for canonically-encoded files, validated on 20k+ production SWFs. - Broad tag coverage — shapes, fonts, text, sounds, bitmaps, sprites, buttons, morph shapes, video, ABC, filters; unknown tags are kept verbatim.
- AVM1 data scripts — evaluate localization/config bytecode into a typed value tree, edit it, write it back, or map it to typed records.
- Typed & allocation-light — a mutable tag tree over
ReadOnlyMemory<byte>, exact fixed-point value types, and typed exceptions.
What it isn't
Scope
- No AVM2 (
DoABC) execution — ABC bytecode is preserved verbatim, never run. - The AVM1 evaluator is linear only (data scripts): no control flow, function calls, or display objects.
- The AS2 listing is best-effort, not a full decompiler.