# ADR 0013: ActionScript compatibility * Status: accepted (2026-11-08) as scope and placement. **Tier 1 built** (2026-11-09, see "Tier 1 as built" below). **Tier 2 built** (2026-11-10, see "Tier 2 as built"). **Tier 2.5, small logic, built** (2026-11-11, ADR 0052) * Relates to: requirements U2 (scripting surface), roadmap M6, ADR 0009 (XFL import), `docs/legal/compliance.md` ## Context The project lead asked for ActionScript on the roadmap if it fits our constraints, at low priority, since it serves a smaller group of users. U2 already settled AniCraft's own scripting: the Craft-family WebAssembly plug-ins, with frame scripts on the same sandbox. The ActionScript question is about compatibility for people who bring Animate projects with code in them. What those users have, in order of how common it is: 1. **Timeline control in frame scripts**: `stop()`, `play()`, `gotoAndPlay`/`gotoAndStop` by frame number or label, `nextFrame`/`prevFrame`, the same calls on a named instance (`hero_mc.gotoAndStop("run")`), and button clicks wired to those calls with `addEventListener(MouseEvent.CLICK, …)`. Most animation and e-learning work only uses this. 2. **Small logic**: variables, `if`, loops, `trace`, setting instance properties (`x`, `alpha`, `visible`), simple functions. 3. **Applications and games**: classes in packages, the document class, linked symbol classes, the full `flash.*` platform API (display list, events, networking, sound, text), compiled to bytecode for a player. Current Animate documents run ActionScript 3.0 only; ActionScript 1 and 2 live only in old files. Today the XFL importer drops frame scripts without a word. Our constraints: Rust only, no unsafe, never crash on hostile input, everything is a command, time is a function (`evaluate` is pure), clean room (public documents and observation only), permissive dependencies from crates.io, and Adobe names used only nominatively. ## Decision ActionScript fits as a **compatibility front end in three tiers**, built in order, each one useful alone. Only the first two are planned. It stays low priority: in M6 after the WebAssembly plug-ins, frame scripts and HTML canvas export, and it may slip past M8 without blocking anything else. 1. **Keep (tier 1).** Scripts are content and are never lost. * The document model gets `Keyframe.script: Option>`, where `Script` holds the source text verbatim and its language (`ActionScript3`, `ActionScript1or2`, `Other`), plus symbol linkage and document class names as plain strings. Saved in `.anicraft` (a minor format version with `#[serde(default)]`, so older files open unchanged). * The XFL importer reads `