Open ROBERT-MCDOWELL opened 7 years ago
Also is AVMPlus covers the whole actionscript2/3 classes? thanks for your answer
Avmplus implements the Actionscript 3 language and certain core classes considered part of the base language, e.g. Array and String. Most of the classes you might use in Flash Player or AIR are part of those respective platforms, and are not included in avmplus. Actionscript 2 is implemented in Adobe Flash Player and Adobe AIR, but is a completely separate and earlier implementation, despite some similarity in the languages. Avmplus and AVM2 are one and the same, though, to confuse things, AVM2 implements the AS3 language (!). I believe the history here is that the first scripting mechanism called Actionscript, retroactively referred to as Actionscript 1, was much more primitive and didn't actually require anything we'd call a VM.
never too late ;) ok gotcha, so AVMplus doesn't support all adobe Flash classes like NetConnection, NetStream, NetGroup etc...?
No. You can find the classes that it does support by looking in the files core/*.as . For the most part, these are stubs containing native method declarations for classes implemented natively in C++. Avmplus is intended as a scripting language for a host platform (such as Flash Player), exposing the APIs of that platform. The RedTamarin project, for example, is a host platform oriented toward server-side applications.
right, is avmplus use already in some host programs? it looks interesting to use Actionscript3 on host, but what the future of it? A lot of us are already stuck with the eol of Flash and dunno how to convert easily 20 years of AS code, especially when classes like multicast, netgroup etc... are not present in javascript (for now). integrate Flash api into webassembly would be a good solution...
Maybe a diagram from the Redtamarin documentation can help
The AVM2 covers only the builtins related to the ActionScript 3 Language Specification
there are few extras or extensions like ByteArray
, Worker
, etc.
Each hosts implement their own API, the Flash Player API for the Flash Player host, the AIR API for the Adobe AIR runtimes, etc.
All those hosts, and others like the Redtamarin shell, share only the builtins, some other API can be shared too, but the AVM2 does not necessarily provide the implementations of those API.
Take something like flash.net.Socket
, even if the AS3 frontend definitions can be identical, the underlying implementation can be different
flash.net.Socket
will depends on the browser network stackflash.net.Socket
provide its own network stackflash.net.Socket
also provide its own network stackIt is the host responsibility to provide such implementations, not the AVM2.
If your goal is to translate ActionScript 3 code that was executed inside a host like the Flash Player, into a host like the browser (without the support of a plugin), then you will have to implement API like flash.net.Socket
with what is available in the host.
If you can not directly access sockets or a network stack in your host, webassembly will not help.
thanks for the diagram, interesting. Many developers are struggling today to find a solution about all code developed the last 20 years for Flash and unfortunately does not have a same quality replacement in browser without to reinvent the wheel again and not lacking in very important classes like netgroup and multiast, vector etc... I developed in Actionscript 2/3 for many companies and until today are very happy of their Flash app, approaching the Flash eol they certainly don't understand why there is not a smooth replacement to it without to modify the code.
Hi, is AVMPLUS a clone of AVM2? is AVM1 supported? thanks