Flash & SWF Support

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.

Adobe Flash Player reached end-of-life in December 2020 and is no longer distributed by browsers. Paintapp's SWF support lets you open and view legacy Flash content for archival and asset-extraction purposes.

SWF Format Versions

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 versionFlash Player equivalentActionScript 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.

File Compression

A .swf file may be stored uncompressed or compressed in one of two ways. Paintapp opens all three.

CompressionUsed by
Uncompressed SWF 1 and later
Deflate (zlib) SWF 6 and later — the most common
LZMA SWF 13 and later — published for Flash Player 11+

LZMA-compressed movies usually end up smaller than deflate-compressed ones.

ActionScript 1 / 2 — AVM1

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.

FeatureStatus
Core opcode set (89 opcodes)Supported
Function definitions (DefineFunction, DefineFunction2)Supported
with blocksSupported
Try / catch (partial)Partial
Variable scope chainPartial
GetURL / loadMovieLimited
SetTarget path navigationNot supported

ActionScript 3 — AVM2

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 featureStatus
ABC bytecode interpreterSupported
Class definitions, inheritance, static membersSupported
Instance variables / slots, getters & settersSupported
Closures / nested functionsSupported
Exceptions (throw / try / catch / finally)Supported
Type coercions (coerce, convert_*)Supported
is / instanceofSupported
Namespaces / multinamesPartial
InterfacesPartial
for-in / for-each-inPartial
Vector.<T>Not supported
Debugger breakpoints (step-into / step-over)Supported
Workers (flash.system.Worker)Supported

Standard Library Coverage

The following flash.* packages are implemented, fully or partially. The ActionScript 3 API page lists every class and member.

PackageCoverage
flash.displayDisplayList, MovieClip, Sprite, Shape, Bitmap, Stage, Loader — mostly supported; some child-order and Stage focus APIs missing
flash.eventsEventDispatcher, Event, MouseEvent, broadcast events (enterFrame, addedToStage) — supported; KeyboardEvent, FocusEvent, TimerEvent not yet implemented
flash.geomPoint, Rectangle, Matrix and ColorTransform are complete; Transform is partial; 3D geometry (Vector3D, Matrix3D) not implemented
flash.utilsByteArray, Dictionary, Endian, setTimeout/setInterval/getTimer — supported; Timer class and AMF not implemented
flash.netURLLoader reads files stored beside the .swf; NetStream plays nothing, and SharedObject, Socket and the rest are not implemented
flash.systemSecurity, Capabilities, Worker, WorkerDomain — supported
flash.mediaVideo on the timeline plays, but its ActionScript attach methods throw; Sound and camera classes not implemented
flash.filtersBlurFilter (partial); other filters not implemented
flash.externalExternalInterface reports no container is available; addCallback and call are no-ops
flash.errorsStandard error classes — supported
flash.cryptogenerateRandomBytes — 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.

SWF Tag Decoding

A SWF body is a flat stream of tags, each with a type number and a length. The player walks the whole stream — including the tag lists nested inside DefineSprite — and hands every tag it recognizes to a parser. A tag it does not recognize is stepped over by its own length and playback continues, so an unsupported tag never aborts a file.

The table covers every tag the SWF specification defines. Supported and Partial mark what the player parses. Ignored means the tag is dropped and nothing is lost by dropping it — text hinting hints, authoring-time flags such as Protect and the debugger tags, numbers no tool emits any more. Unsupported is a real gap: something in the file does not reach the screen or the speakers, and the Notes column says what. File Info reports what several of these tags say about the file — protection, debugging, imports — from a separate header scan, whether or not the player uses them. Tag numbers missing from the table are Macromedia Generator leftovers or were never assigned; no Flash authoring tool emits them.

TagNameStatusNotes
1ShowFrameSupportedFrame boundary — drives the timeline.
2DefineShapeSupportedFills, strokes, edge records.
3FreeCharacterIgnoredObsolete SWF 1 tag; no Flash authoring tool emits it.
4PlaceObjectSupportedMatrix and color transform.
5RemoveObjectSupportedRemoves by character id + depth.
6DefineBitsSupportedJPEG image that borrows its tables from JPEGTables.
7DefineButtonSupportedUp / over / down / hit states plus the action list.
8JPEGTablesSupportedShared JPEG tables for DefineBits.
9SetBackgroundColorSupportedStage background.
10DefineFontSupportedGlyph outlines.
11DefineTextSupportedStatic text records.
12DoActionPartialAVM1 frame script — see the ActionScript 1 / 2 table above.
13DefineFontInfoSupportedCharacter-code map for a DefineFont.
14DefineSoundPartialParsed for every codec; only MP3 is decoded for playback.
15StartSoundPartialOne event sound is played; volume envelopes are ignored.
17DefineButtonSoundUnsupportedButtons make no sound.
18SoundStreamHeadPartialMP3 streams only.
19SoundStreamBlockPartialBlocks are concatenated into one MP3 stream.
20DefineBitsLosslessSupported8-, 15- and 24-bit zlib bitmaps.
21DefineBitsJPEG2SupportedJPEG, PNG or single-frame GIF payload.
22DefineShape2SupportedLarger style tables.
23DefineButtonCxformUnsupportedThe per-state color transform of a v1 button is not applied.
24ProtectIgnoredAn authoring-time editing lock, optionally carrying a password hash. It asks authoring tools, not players, to prompt for it — Flash Player never enforced it either, and Paintapp opens protected files without asking. Reported in File Info.
26PlaceObject2SupportedMatrix, color transform, ratio, clip depth, instance name, clip actions.
28RemoveObject2SupportedRemoves by depth.
32DefineShape3SupportedRGBA fills and strokes.
33DefineText2SupportedStatic text with alpha.
34DefineButton2SupportedState records with color transforms and filters, plus condition actions.
35DefineBitsJPEG3SupportedImage plus a zlib-compressed alpha plane.
36DefineBitsLossless2SupportedLossless bitmap with alpha.
37DefineEditTextPartialThe field's initial text is drawn as static text. Not editable or selectable; HTML markup, borders and scrolling are ignored.
39DefineSpriteSupportedNested timelines, parsed recursively.
41ProductInfoSupportedUndocumented Adobe tag — authoring tool and build date, shown in File Info.
43FrameLabelSupportedLabel names; the named-anchor flag is skipped.
45SoundStreamHead2PartialSame path as SoundStreamHead.
46DefineMorphShapeSupportedStart and end shapes interpolated by the placement ratio.
48DefineFont2SupportedGlyphs, code table and advances; bounds and kerning tables are skipped.
56ExportAssetsSupportedExport names recorded on the document.
57ImportAssetsUnsupportedAssets imported from another SWF are missing. Counted in File Info.
58EnableDebuggerIgnoredAuthoring-time debug password; nothing to play back. Reported in File Info.
59DoInitActionUnsupportedA sprite's AVM1 initialization script does not run. Counted in File Info.
60DefineVideoStreamSupportedStream geometry and codec id.
61VideoFrameSupportedDecoded by codec — see Video Codecs.
62DefineFontInfo2SupportedCode map with a language code.
63DebugIDIgnoredUndocumented debug GUID left by the compiler.
64EnableDebugger2IgnoredAs EnableDebugger, SWF 6 and later.
65ScriptLimitsSupportedThe movie's own recursion cap and script timeout are applied to both VMs.
66SetTabIndexUnsupportedTab order is not implemented.
69FileAttributesSupportedSelects AVM1 or AVM2; network and metadata flags read.
70PlaceObject3SupportedAdds class name, blend mode, filter list, cacheAsBitmap and visibility. Filters themselves are partial.
71ImportAssets2UnsupportedAs ImportAssets, SWF 8 and later.
72DoABC (unnamed)SupportedThe SWF 9 form without flags or a name.
73DefineFontAlignZonesIgnoredClearType hinting zones — the renderer does not hint glyphs.
74CSMTextSettingsIgnoredClearType anti-aliasing settings for a text field.
75DefineFont3SupportedHigh-resolution glyph coordinates.
76SymbolClassSupportedBinds characters to AS3 classes, including the document class.
77MetadataSupportedThe XMP packet is kept and shown in File Info.
78DefineScalingGridUnsupportedA scaled sprite or button stretches as a whole instead of keeping its 9-slice corners at their authored size.
82DoABCSupportedNamed, lazily-initialized ABC block.
83DefineShape4SupportedStroke joins, caps and scaling flags read.
84DefineMorphShape2SupportedAs DefineMorphShape, with the extended stroke fields.
86DefineSceneAndFrameLabelDataPartialScene names are read for File Info; the player itself uses only the scene count, and scene navigation is not implemented.
87DefineBinaryDataSupportedStored in the character dictionary, reachable from AS3 through SymbolClass.
88DefineFontNameSupportedThe font's full name and copyright string, recorded on the font character alongside the short name from DefineFont2 / 3 / 4.
89StartSound2PartialParsed, but a sound referenced by class name is not played.
90DefineBitsJPEG4SupportedImage plus alpha plane; the deblocking parameter is ignored.
91DefineFont4SupportedThe embedded CFF / OpenType font is parsed.
93EnableTelemetryIgnoredAdobe Scout profiler opt-in and password hash.
94PlaceObject4UnsupportedAn object placed with this tag never appears. Emitted by very few authoring tools.

Video Codecs

SWF video streams and embedded FLV content use Flash-specific codecs decoded in JavaScript:

CodecUsed inStatus
Sorenson H.263SWF video streams, FLVSupported
Screen Video (v1 & v2)SWF video streams, FLVSupported
On2 VP6 / VP6 with alphaFLVNot supported
H.264 / AAC in FLVFLVNot supported (browser Media Source used instead)

Rendering

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:

Known Limitations