
Shumway: Flash implementation in JavaScript - cyborgx7
https://github.com/mozilla/shumway
======
kbumsik
This is officially in the Firefox Graveyard.

[1]:
[https://bugzilla.mozilla.org/describecomponents.cgi?product=...](https://bugzilla.mozilla.org/describecomponents.cgi?product=Firefox%20Graveyard)

~~~
skrowl
Yep, it's abandoned. No commits since 29 Mar 2016.

------
actionscripted
> Latest commit 16451d8 on Mar 29, 2016

I'm all for keeping old things around and that includes Flash stuff (look at
my user name). But Shumway is super dead.

I believe there are more active projects going you might want to check out if
you're looking to keep Flash alive/around.

Alternatives:

* [https://get.adobe.com/flashplayer/otherversions/](https://get.adobe.com/flashplayer/otherversions/) (yeah, still works!)

* [https://github.com/lightspark/lightspark](https://github.com/lightspark/lightspark)

* [https://wiki.debian.org/PepperFlashPlayer](https://wiki.debian.org/PepperFlashPlayer)

~~~
nwah1
Also OpenFL and Apache Royale

------
cyborgx7
Like pdf.js but for flash.

Sadly it seems to be dead.

I found this effort to port what there is to a webextension but there is no
documentation how far that person got and the last commit was 3 months ago.

[https://github.com/ExE-Boss/mozilla-shumway/tree/web-
extensi...](https://github.com/ExE-Boss/mozilla-shumway/tree/web-
extension/extension/webext)

~~~
asaph
Three months of no commits is not enough to declare a project dead.

As for Shumway, looking at the commit history[0], the last commit was over 2
years ago.

[0]
[https://github.com/mozilla/shumway/commits/master](https://github.com/mozilla/shumway/commits/master)

~~~
cyborgx7
I forgot to add the link to that porting effort, and I didn't mean to declare
it dead, just status uncertain.

[https://github.com/ExE-Boss/mozilla-shumway/tree/web-
extensi...](https://github.com/ExE-Boss/mozilla-shumway/tree/web-
extension/extension/webext)

------
tombert
Stuff like this makes me wish Adobe had just open-sourced Flash. I hope this
doesn't start a flame war, but I think that most of the crap that Flash gets
stems from the fact that it's a proprietary plugin...if Adobe releases part-of
or all of the source code, we conceivably could avoid losing history, and
someone could write something that compiles to WebAssembly or something.

I remember when Shumway was announced a few years ago, and I was excited that
this might be the solution that everyone asked for, but I suspect the problem
was a lot harder to solve than most people thought it would be
(unsurprising...Flash has 20+ years of baggage in its codebase, who knows how
many weird hacks have piled up).

~~~
mbebenita
As one of the main developers on the project I can say that yes, 20+ years of
undocumented baggage made it a really hard problem to solve.

~~~
tombert
What was the process of reverse-engineering something like Flash? Did you
simply do it by looking at the bytecode (or whatever it's called in Flash), or
did you write something with the mainline compiler and work from there?

~~~
mbebenita
The bytecode for AVM2 is fairly well documented, and there is a test suite
that you can compare against. We reached 99% compatibility with that, and were
at times much faster than the Flash VM (simply benefiting from years of
investment in JS engines).

The hard part was understanding what the Flash player was doing, and the
differences between all the different Flash Player and SWF File Format
versions. Not to mention, re-implementing the rendering engine and the entire
API surface of Flash, which was HUGE. We basically took existing content and
tried to make sure Shumway did the same thing the Flash player did, wrote a
regression test and repeated the process.

To this day, I still don't understand exactly how the timeline worked (or was
supposed to work). It's like a web page DOM, but you can jump back and forth
in the timeline, it's wild.

We certainly learned a lot working on Shumway. Firefox got a lot better, we
stressed the JS engine and the graphics stack quite a bit, and had to make
improvements all throughout the codebase to make Shumway possible.

In a lot of ways, Flash was great. Its rendering engine was (and still is)
quite impressive, and nothing has really replaced it yet.

~~~
tombert
I feel the same way. Flash got so much crap from people, and a lot of it was
deserved, no question, but people go so onboard with the "KILL ALL FLASH"
bandwagon that they sort of forgot to replace it completely.

Video streaming with HLS isn't horrible, but it was so much easier (in my
opinion) to do Flash with RTMP.

------
ape4
Remember when getting a "free" (as in libre) version of Flash was a high
priority.
[https://www.gnu.org/software/gnash/](https://www.gnu.org/software/gnash/)

------
jancsika
Two questions:

1\. Can it faithfully reproduce Flyguy?

2\. Can it faithfully reproduce homestarrunner.com?

When the answer to both is "yes," then Shumway has reached its goal and the
devs can stop coding. :)

~~~
superkuh
Unfortunately ... the system is down.

~~~
theandrewbailey
Have some technochoclate.

------
evincarofautumn
I worked on a Flash implementation called Spaceport in 2012 or so. We had the
most complete implementation apart from Adobe, with all kinds of goodies like
actual hardware-accelerated graphics on mobile (far better than the buggy
AIR). Tried to get Mozilla to buy us out, since they were looking for a way to
incorporate an open Flash implementation more complete than Shumway, but they
didn’t bite. Ended up acquihired by Facebook, product abandoned. I sometimes
wonder, if things had gone differently, whether we could have given new life
to the Flash ecosystem. Oh well.

~~~
mmastrac
I was working for Nickelodeon on HTML5 gaming around that time and I think I
remember seeing your product. You might have interacted with some of the same
people I did!

Does Facebook own your IP? Might be worth investigating whether you can loose
it from where ever it lives. There will likely be a flash gaming revival over
the next decade as all the kids try to revisit their childhood memories.

~~~
evincarofautumn
> Does Facebook own your IP?

No, afaik it should still be owned by the startup incubator that was the
parent company of Spaceport. We open-sourced some ancillary bits and pieces
before leaving, but not the most important components of the platform like the
ActionScript compiler, build system, Flash API implementation, and
renderer/engine.

I might try to get in touch with them, but open-sourcing it wouldn’t be
enough—realistically it would take most of the old team just to get it back
shipshape, let alone continue adding features, and I know most of them don’t
have the time or desire to do that for free 5–6 years after leaving it behind.

------
hateful
Flash will always be needed. How else will we view Zombo.com?

~~~
Malic
I mostly agree - but just in case, there is
[https://html5zombo.com/](https://html5zombo.com/)

------
shmerl
Mozilla abandoned it, I suppose because it required too much effort to
complete and they need to concentrate on Firefox.

------
vikbez
I used this with great results:
[https://github.com/swf2js/swf2js](https://github.com/swf2js/swf2js)

~~~
wyatt8740
It's pretty awesome, but it's lacking a few very important things. The first I
noticed was that it has no support for saving and loading shared object
libraries (SOL's), which are what pretty much every flash game used to save
data between sessions. They're pretty much 'Flash cookies.'

Also, it, like pretty much every other project except lightspark, doesn't seem
to implement much of AVM2/ActionScript 3, which the "last generation" of
flashes mostly used. Lightspark supports more of it, but still has severe
rendering issues.

------
Nelkins
Looking forward to the Rust implementation, compiled to Web Assembly :)

------
ZenPsycho
There have been forks and attempts at rewriting bits of it since it "died"
[https://github.com/ivanpopelyshev/shumway/commits/master](https://github.com/ivanpopelyshev/shumway/commits/master)

there's also this thing [https://github.com/open-flash/open-
flash](https://github.com/open-flash/open-flash)

Apparently the hard part is not the swf format, or the bytecode interpreter,
or the action script language, it's the rendering engine, apis, and the vast
number of bugs that content has over the years come to depend on and expect in
order to work.

------
armanini_io
why?

~~~
glassesman
There's a roughly 20 year history of games and animations built for Flash. It
would be a shame to lose them indefinitely.

~~~
trothamel
I sometimes hope that Microsoft will release, for example, a Windows XP VM in
an app. Perhaps a versions that's limited to connecting to the Internet
Archive to play archived flash projects.

~~~
tracker1
Should be able to combine Flash Player an older Firefox, ReactOS, and v86 to
accomplish what you want.

~~~
wyatt8740
You don't even need a windows clone for that since Adobe is still releasing
linux binaries. Just use a relatively recent debian/ubuntu distro.

