Paintapp includes a built-in SWF player that can open and play back .swf files
directly in the canvas without any browser plugin. The player is a custom JavaScript
implementation of the Flash runtime, covering the display list, ActionScript VMs, and
several video codecs.
SWF files carry a version byte in their header (SWF 1 through SWF 43 covers the full commercial lifetime of Flash). Paintapp reads all versions — the version byte controls which ActionScript VM is used at runtime:
| SWF version | Flash Player equivalent | ActionScript VM |
|---|---|---|
| 1 – 8 | Flash Player 1 – 8 | AVM1 (ActionScript 1 & 2) |
| 9 – 43 | Flash Player 9 – 32 | AVM2 (ActionScript 3) |
SWF 9 and later files may also contain embedded AVM1 clips (DoAction tags).
These are executed by the AVM1 sub-interpreter running alongside AVM2.
A .swf file may be stored uncompressed or compressed in one of two ways.
Paintapp opens all three.
| Compression | Used by | Status |
|---|---|---|
| Uncompressed | SWF 1 and later | Supported |
| Deflate (zlib) | SWF 6 and later — the most common | Supported |
| LZMA | SWF 13 and later — published for Flash Player 11+ | Supported |
LZMA-compressed movies usually end up smaller than deflate-compressed ones.
AVM1 is a stack-based interpreter that executes bytecode from DoAction and
DoInitAction tags. The implementation covers 89 opcodes including arithmetic,
string operations, object property access, function calls, and control flow.
| Feature | Status |
|---|---|
| Core opcode set (89 opcodes) | Supported |
Function definitions (DefineFunction, DefineFunction2) | Supported |
with blocks | Supported |
| Try / catch (partial) | Partial |
| Variable scope chain | Partial |
GetURL / loadMovie | Limited |
SetTarget path navigation | Not supported |
AVM2 is a fully-featured bytecode VM with an explicit call stack, proper scope chains,
exception handling, and namespace-aware multiname resolution. ABC (ActionScript Byte Code)
blocks from DoABC / DoABCDefine tags are parsed into a constant
pool, method table, and class hierarchy, then executed by the interpreter.
| VM feature | Status |
|---|---|
| ABC bytecode interpreter | Supported |
| Class definitions, inheritance, static members | Supported |
| Instance variables / slots, getters & setters | Supported |
| Closures / nested functions | Supported |
| Exceptions (throw / try / catch / finally) | Supported |
Type coercions (coerce, convert_*) | Supported |
is / instanceof | Supported |
| Namespaces / multinames | Partial |
| Interfaces | Partial |
for-in / for-each-in | Partial |
Vector.<T> | Not supported |
| Debugger breakpoints (step-into / step-over) | Supported |
Workers (flash.system.Worker) | Supported |
The following flash.* packages are implemented (fully or partially). See the
full support matrix below for a per-symbol breakdown.
| Package | Coverage |
|---|---|
flash.display | DisplayList, MovieClip, Sprite, Shape, Bitmap, Stage, Loader — mostly supported; some child-order and Stage focus APIs missing |
flash.events | EventDispatcher, Event, MouseEvent, broadcast events (enterFrame, addedToStage) — supported; KeyboardEvent, FocusEvent, TimerEvent not yet implemented |
flash.geom | Point, Rectangle, Matrix, ColorTransform, Transform — core classes supported; 3D geometry (Vector3D, Matrix3D) not implemented |
flash.utils | ByteArray, Dictionary, Endian, setTimeout/setInterval/getTimer — supported; Timer class and AMF not implemented |
flash.net | URLLoader, URLRequest, NetConnection, NetStream, MessageChannel — partial; SharedObject, Socket not implemented |
flash.system | Security, Capabilities, Worker, WorkerDomain — supported |
flash.media | Video (partial); Sound and camera classes not implemented |
flash.filters | BlurFilter (partial); other filters not implemented |
flash.external | ExternalInterface.available/addCallback/call — partial |
flash.errors | Standard error classes — supported |
flash.crypto | generateRandomBytes — supported |
AVM2 globals — Math, Array, String, Number,
Boolean, int, uint, RegExp — are backed
directly by JavaScript built-ins and are fully supported.
Date and XML (E4X) are partially supported.
Vector.<T> is not yet implemented.
All commonly used SWF tags are decoded. Notable coverage:
SWF video streams and embedded FLV content use Flash-specific codecs decoded in JavaScript:
| Codec | Used in | Status |
|---|---|---|
| Sorenson H.263 | SWF video streams, FLV | Supported |
| Screen Video (v1 & v2) | SWF video streams, FLV | Supported |
| On2 VP6 / VP6 with alpha | FLV | Not supported |
| H.264 / AAC in FLV | FLV | Not supported (browser Media Source used instead) |
The SWF display list is rendered into Paintapp's WebGL 2 canvas. Shapes are tessellated and uploaded as GPU geometry; bitmaps are uploaded as textures. Rendering features:
A searchable, filterable table covering every flash.* class and SWF tag is
maintained in the SWF module. Open it in a new tab:
swf/as3-support.html — AS3 API & SWF Tag Support Matrix
Sound / SoundChannel / SoundMixer
are not implemented. SWF files that rely heavily on ActionScript audio APIs will be silent.
Inline stream sound (SoundStreamBlock) has partial support.
KeyboardEvent is not implemented.
Interactive SWF content that requires keyboard navigation will not respond to key presses.
DefineText are displayed correctly.
SharedObject, Socket, and AMF-encoded
NetConnection calls are not implemented.
SetTarget path navigation
in AVM1 have known gaps that may affect older Flash 4–5 content.
flash.geom.Vector3D, Matrix3D, and
PerspectiveProjection are not implemented. Molehill / Stage3D is not supported.