ActionScript 2 vs. ActionScript 3 in Ruffle: Understanding Game Compatibility

A technical comparison of AVM1 and AVM2 architectures in the Ruffle Flash emulator, explaining why older Flash titles run reliably while complex late-era titles require ongoing development.

When testing classic web games using modern Flash emulators, users frequently observe a stark difference in playability: games released in the early to mid-2000s (such as Alien Hominid, Pico’s School, or Fancy Pants Adventures) typically load instantly with accurate physics and audio, while complex games from 2010 onwards (Bloons Tower Defense 5, Learn to Fly 2, or Swords and Sandals) may freeze on loading screens or fail to register menu clicks.

This divide reflects a fundamental architectural transition in the history of web multimedia: the shift from ActionScript 1/2 to ActionScript 3.

This guide outlines the technical differences between these two language runtimes, why ActionScript 3 emulation requires a separate virtual machine, and how to verify game compatibility.


1. The Two Virtual Machines: AVM1 vs. AVM2

In Adobe Flash’s development history, ActionScript evolved in two distinct generations that run on completely separate internal engines:

                  ┌────────────────────────┐
                  │    Legacy .SWF Asset   │
                  └───────────┬────────────┘
                              │
               Which bytecode does it contain?
                              │
          ┌───────────────────┴───────────────────┐
          ▼                                       ▼
  [ActionScript 1 & 2]                   [ActionScript 3]
  ├── AVM1 Runtime                       ├── AVM2 Runtime
  ├── Prototype-based scripting          ├── Class-based OOP architecture
  ├── Loose timeline-bound execution     ├── Typed bytecode (ABC format)
  └── Near-complete emulation in Ruffle  └── Ongoing implementation in Ruffle

ActionScript 1 & 2 (The AVM1 Era)

Produced predominantly from 1998 through 2006 (Flash 4 through Flash 8):

  • Execution Model: AVM1 is a prototype-based, dynamically typed language closely related to early ECMAScript (JavaScript). Code was frequently written directly onto timeline frames or attached to specific button symbols (on(release) { ... }).
  • Display Hierarchy: Display objects were manipulated through simple, loosely enforced timeline paths (such as _root and _parent).
  • Emulation Status in Ruffle: Ruffle’s AVM1 engine is mature and feature-complete. Because the language relies on simpler execution rules, the vast majority of games from the early-to-mid 2000s execute with high accuracy.

ActionScript 3 (The AVM2 Era)

Introduced with Flash Player 9 in 2006:

  • Execution Model: ActionScript 3 was not an incremental update—it was a complete rewrite. Adobe introduced AVM2 (ActionScript Virtual Machine 2), featuring strong static typing, full class-based object-oriented inheritance, and a dedicated bytecode format (ActionScript Byte Code, or ABC).
  • Strict Display List: AVM2 eliminated global timeline references in favor of an explicit hierarchical display list (stage, DisplayObjectContainer, Sprite), requiring precise event propagation rules.
  • Complex Standard Libraries: Later AS3 titles incorporated advanced networking sockets, binary byte arrays, cryptographic hashing, and eventually hardware 3D graphics APIs (Stage3D/AGAL).
  • Emulation Status in Ruffle: To support AS3, the Ruffle project must implement a complete, separate virtual machine and standard class library in Rust. Many popular single-player AS3 games run reliably, but titles utilizing complex external libraries, unmapped opcodes, or Stage3D acceleration remain in active development.

2. Checking a Game’s ActionScript Version

You can verify which ActionScript version a game uses directly from Ruffle’s context menu:

  1. Right-click anywhere inside an active Ruffle canvas player.
  2. Review the diagnostic line at the bottom of the context menu:
    • SWF Version 4–8 (ActionScript 1 or 2): Indicates the game runs on the mature AVM1 engine. If an issue occurs, it is likely an edge-case visual bug.
    • SWF Version 9–32 (ActionScript 3): Indicates the game relies on AVM2. If the game hangs on a loading screen, an unmapped AVM2 class or opcode is likely being encountered.

3. Testing Experimental AS3 Games (Nightly Builds)

The stable Ruffle extension published on official browser web stores updates on a scheduled release cycle. However, the open-source engineering team merges daily additions to the AVM2 engine in Nightly Builds:

  • If an ActionScript 3 title fails to load using the stable release, testing the latest Ruffle Nightly build (available from the official Ruffle repository) provides access to recently implemented opcodes and bug fixes.
  • For complex late-era Flash games that rely on un-emulated Stage3D graphics or multiplayer socket servers, standalone preservation archives (such as BlueMaxima’s Flashpoint) offer an alternative preservation method using sandboxed legacy runtimes.

Summary

Early Flash games built on ActionScript 1 and 2 run with near-flawless reliability in Ruffle because the prototype-based AVM1 engine is mature. ActionScript 3 titles run on a completely separate, class-based virtual machine (AVM2) that is actively progressing through community implementation. Checking the SWF version via the right-click menu confirms whether a title relies on AVM1 or AVM2.


Share this guide
DV

About the Author: Devin Vance

Devin Vance writes technical guides and performance benchmarks at TabGamer, covering browser graphics, WebGL flags, low-spec laptop optimization, and retro WebAssembly emulation.