3 ms·
Adobe actually was targeting web, or at least trying to: in 2012 they shipped Adobe Wallaby which allowed export of timeline animations to HTML5. Then they repl
by kmeisthax 5y ago
Adobe actually was targeting web, or at least trying to: in 2012 they shipped Adobe Wallaby which allowed export of timeline animations to HTML5. Then they replaced it with CreateJS export. Both of these had absolutely zero support for ActionScript and relied on the user to rewrite their app for browser JS. The reason for this is because actually getting ActionScript to work, and work well, is very hard - especially with 2013's mobile web browsers.
The most obvious solution - recompiling ActionScript bytecode or source for the web - would be very difficult, for a number of reasons. While AS2 and AS3 are both ECMAScript derivatives, they differ substantially from the JavaScript we actually ship in browsers. Even basic property look-up deviates significantly from regular JavaScript, either because AS2 has too many compatibility hacks, or because AS3 has too many ES4 features that never actually made into browsers.
If you wanted ActionScript to work, you would need to ship your own AVM implementations, which in 2013 would not be performant on Mobile Safari[0]. Google and Mozilla both did that anyway, shipping interpreters for AVM1 and AVM2 code. For Google's intended use case of porting ads to HTML5, this was fine. Mozilla would eventually abandon Shumway, however, citing performance problems. It was very much ahead-of-its-time. And Google's intended use case stopped making sense as advertisers just used HTML5 tools anyway, so that was shuttered too.
I'm not entirely sure what they meant by AS4 being a compiled language, though. All ActionScript is compiled into bytecodes and can be further recompiled into optimized native code (though AS2 never got this treatment). The language spec PDF seems to hint at ahead-of-time compilation, which absolutely would help iOS, but only to say that such compiled code needs to work the same as the interpreter. Whether that was actually enabled by new language semantics or just intended to be handled with profiling an instrumented AVM4 is something I would like to know.
Implementing AS4 in Ruffle would not be practical without a compiler and player implementation, and as far as I can tell those weren't ever publicly released. The standard library of a language and how events are pumped into it's UI framework are just as important, if not moreso, than how the language describes it's code.
[0] asm.js was a thing in 2013, but it was a Mozilla-specific technology Safari never implemented. WASM would not be standardized until 2017, with Safari support launching that year. At that point Flash Player was already on life support.