Skip to main content
Participant
January 2, 2018
Question

Happy new year! As3-WebAssembly is out.

  • January 2, 2018
  • 8 replies
  • 12321 views

Happy new year, everyone!

Hope this news is not too late.

After few month hard working, we successfully get existing As3 to work with WebAssembly. After our wasm hand-writing Flash-API finished(about 20% finished now). All of the existing As3 projects would successfully port to open-web-standard (js, wasm) without modifying the original  As3 codes.

Here is a brief instruction on how it works:

1) We use the falconJX compiler to compile As3 source codes into JavaScript, we modified a lot to support interacting with wasm. such as class inheritance,  optional function params, etc.

2) Using a wasm that contains hand-writing Flash-API to support original dependencies of As3 codes, such as packages: flash.display, flash.events, flash.net, etc.

3) Linking the compiled JavaScript from step1 with wasm from step2 at runtime.

Here is a GitHub repository: GitHub - JasonHuang3D/AJC-Flash-WebAssembly-Examples: Examples that demonstrates As3 running on WebAssembly

that contains pre-built demos and bunny mark source codes with our SDK to build for both original flash player and js-wasm.

Currently, The whole building toolchain has been integrated with our customized FlashDevelop IDE, We modified a lot with FalconJX compiler and Emscripten Embind to support almost all of As3 language intrinsics.

The core motivation for this project is hand-writing Flash-API using c++. We have nothing to reference to but using "trace" and breakpoint in an original As3 project to roughly guess what the actual implementation inside of Flashplayer. We have done tones of testing before starting to write our own Flash-API. Currently, we only got basic display list, event flow,  networking, and basic data structures: byteArray, etc. We have a lot more to do.

The reason for doing this whole project is simply because we love flash, we don't wanna just standing and watching it running to 2020. We all witnessed how powerful flash is. We wish to extend it to open web standard by using wasm. and providing Flash-API with more scripting languages such as JS, TS.

We started this project half a year ago. we tried to recruit as much talent developers as possible. Eventually, we got 2, me and a close friend of mine.

We are not very clever developers. even some skills were not capable of doing a project like this, such as java for compilers, c# for code IDE, etc. But we have faith. we know this is what we want to achieve, and we will never give up.

To deploy the whole wasm hand-writing Flash-API is urgent, as currently, more and more As3 developers started to migrating their project into hand-writing JS/TS.

So, we need your help to speed up our hand-writing Flash-API progress. If Adobe somehow would spare a tiny mercy on this project, that would be perfect.

please let me know if you are willing to help.

Sincerely,

Jason Huang

    This topic has been closed for replies.

    8 replies

    Alama.be
    Known Participant
    September 21, 2020

    If this is true and not as always a unicorn, then I just have to party and offer drinks to all my friends !! I have been doing flash since 1999 when it was still Macromedia until 2013 with AS3 and I started AGAL ..
    I have NEVER found an equivalent to AS3 in other languages. A well thought out and complete framework. I have been waiting for Adobe to offer a JS compiler for 7 years now, and today WASM which undoubtedly represents the future !! more and more applications will be online as a web service

    Alama.be
    Known Participant
    September 21, 2020

    My precedent post is a mistake! sorry.
    Why not just transpile the "* .as" files to "* .razor" then the files that have become components can be used in a Microsoft Blazor application which will be compiled into a webassembly.
    It's just an idea.

    Robert Mc Dowell
    Legend
    September 21, 2020

    a As1/2/3 to TypeScript will be more efficient I think.

    Alama.be
    Known Participant
    January 21, 2020

    This project is abandonned ..I had confirmation by Jason this morning.. 😞

    Robert Mc Dowell
    Legend
    January 21, 2020

    do you know the reason?

    Alama.be
    Known Participant
    September 21, 2020

    I dont no !! It's ugly! 😞 Adobe is missing a bandwagon this time! I hope someone with the right skills will have the intelligence to do it !! a compiler (AS3 to WASM)..

    Alama.be
    Known Participant
    January 19, 2020

    What kind of help are you looking for? Programming, translation, communication, other?
    Sinon, où peut-on trouver le compilateur dans son développement actuel? Et quelle version de FlashDevelop permettrait de faire les essais?

    Alama.be
    Known Participant
    January 19, 2020

    Oh my god, this news pierces my heart like a thunderbolt, I couldn't believe it anymore !!! I almost want to cry. I programmed for 13 years in AS1 (Macromedia), and then in 2 and 3 (Adobe) and I started AGAL in 2013 approximately. When we announced the imminent death of Flash, I didn't want to believe it, Apple first, I said to myself, I don't care, hell with Apple, I code for the WEB anyway and that's it universal thanks to browsers. then when browsers blocked Flash Player by default, it was almost the end of the world for me! In any case, the end of my world. And there, it would be a question of making an AS3 compiler towards WebAssembly? Wow! There is no word.

    Robert Mc Dowell
    Legend
    January 19, 2020

    we are all fighting to keep all our precious work alive and for sure soon there will be robust solutions other the javascrap.

    Inspiring
    August 12, 2018

    I've just discovered this and it seems the GitHub link is now broken.

    What is the status of this and where can I find the work to date?

    Robert Mc Dowell
    Legend
    August 12, 2018
    Frédéric C.
    Inspiring
    January 6, 2018

    This is a very impressive achievement, congratulations! Now the toolchain to use might still appear a bit unclear to some people (including me), but once things are more polished and simple tools are available, it will probably a life saver for many coders who want to keep their Flash content alive. Thank you so much for your work, and happy new year too!

    (And I suggest we actually use another name than Flash, as it seems it has become some kind of curse in the IT industry )

    Participant
    January 4, 2018

    Hi Jason,

    Recently I searched the OpenFl framework and saw that now it can be compiled to WASM via C++ (Emscripten). It has a very rich set of FlashAPI that is already implemented and tested.

    I have an idea that if you can modify your AJC toolchain to use the FlashAPI of OpenFL project, you will save a lot of time to re-write the whole FlashAPI.

    Participating Frequently
    January 4, 2018

    @BuiSyNguyen I think the appeal behind Jason's efforts is not the WASM target itself, but the fact you could port an AS3 project to WASM without changing a line of code. He's even separated out the compiled JS source from the runtime, effectively creating a plugin-free flash player. As he stated in his post, more developers are starting to port their AS3 code-bases by hand and an effort such as this could save millions of cumulative man-hours.

    No offense to OpenFL, but it doesn't solve the fact that hundreds of thousands of games are going to be unusable after 2020. I think most Flash devs would prefer to work on new projects rather than trying to port old ones (which is extremely risky since there's no guarantee that porting something to OpenFL or other frameworks will result in a usable product in a reasonable amount of time).

    Participant
    January 4, 2018

    I did not propose OpenFL, I've been actually paying attention to Jason's work for 6 months, and I sure know he is customizing FalconJX compiler (now its name changed to Royale) to transpile from AS3 to a JavaScript source that combined with his WASM FlashAPI.

    Please read again: I suggest he use the WASM version of OpenFL's FlashAPI for his javascript side. Still use the same AS3 source code without changing any line.

    Participating Frequently
    January 4, 2018

    This is unbelievable! I fully support this effort

    Adobe, if you're reading this I really hope that you'll at least acknowledge this thread. This could be a huge deal in preserving decades of content that would be lost after 2020 (and effectively massive amounts of advertising revenue generated by that content on sites that are still dominated by Flash games such as Kongregate, Newgrounds, etc.)