ActionScript VS JavaScript
Copy link to clipboard
Copied
Thank you for your attention. Would you please describe all the pros and cons of using AS and JS? And in which cases it's more sensible to use each of them? Thank you!
Copy link to clipboard
Copied
actionscript in an as3 project is much more powerful than javascript.
but as3 projects can't viewed by all (most notably mobile) browsers.
Copy link to clipboard
Copied
So, if I want to be sure my animation plays on every device and browser I need to use JavaScript, right?
Copy link to clipboard
Copied
If it is just an animation there wouldn't be any code in it. You would have the option to make the animation in one format and convert it to the other one. If you started with AS3 you would need to be careful not to rely on features that don't exist in HTML5 Canvas. By having two versions you could give desktop users a better experience by showing the SWF, and for mobile browser users you would show them the Canvas version.
One big problem that can come up is synchronizing the sound and animation. In AS3 that is easy, you can set the sound sync to Stream, and the two will keep together on all devices. With Canvas you can't do that. There are code solutions to the problem, or you could just make your animation less demanding, so that it keeps up with the sound.
Copy link to clipboard
Copied
if you want your project to be viewable by the max number of browsers (including mobiles), you can't use actionscript/as3.
Copy link to clipboard
Copied
Usually it isn't a matter of pros and cons, it's that you don't have a choice. These are examples where you must use AS3:
Making SWFs for desktop browsers.
Creating an iOS app.
Creating an Android app.
Creating an AIR desktop app.
For any animation that is going be exported as video, AS3 documents give you more filter effects.
And some possible times you would have to use Javascript:
For some reason your IT department refuse to allow Flash Player to be installed.
What you are making has to be viewable in mobile browsers, or in a web view inside a mobile app.
If you really had a free choice of which one to use, you would only choose Javascript if you didn't know ActionScript and didn't have the time to learn it.

