Introducing NextGen ActionScript

Datetime:2016-08-23 02:53:00          Topic: ActionScript           Share

While many creative developers thrived during the best years of Flash, plugins on the web have fallen out of favor. To continue building immersive experiences in the browser, you need to start migrating to open web standards, if you haven’t already. JavaScript is alright for little prototypes and smaller projects, but for the kind of projects that we build, it really doesn’t compare to a language like ActionScript.

What if you could continue using ActionScript on the web, but without a plugin? What if you could use JS libraries like CreateJS and Pixi.js with ActionScript? Libraries that have familiar APIs inspired by years of working with Adobe Flash Player. I don’t think developers need to start from scratch. We should embrace the open web on our own terms. We’ve heard so many claims that Flash Player is bad, but we know better. We don’t need to abandon the parts that work so well. The ActionScript language especially, but also the great display list APIs and vector drawing capabilities that we came to love so much.

Today, I’m happy to introduce my new website, NextGen ActionScript . In the first tutorial I’ve written there, I teach you how to transpile ActionScript to JavaScript using Apache FlexJS . This tutorial shows you how to integrate with an HTML page natively, by calling DOM APIs with full compile-time type checking. From there, we’re just a step away from integrating with JavaScript libraries like jQuery, CreateJS, Pixi.js, three.js and more!

I also released a new command line utility named dts2as . The TypeScript community has put a ton of effort into adding type annotations to thousands of JavaScript libraries. As we begin transpiling ActionScript, we should be able to benefit from those same resources. The dts2as utility reads a TypeScript d.ts file and uses it to generate a SWC file for a JavaScript library. Pass this SWC file to the Apache FlexJS transpiler or an IDE like Flash Builder or IntelliJ IDEA, and it’ll be as if that library were written in ActionScript. The compiler will check for errors and you’ll get code hints to speed up your development. For more details, read my second tutorial on NextGen ActionScript, Introduction to dts2as: Using TypeScript definitions with ActionScript .

I’m working on many more articles and tutorials (including videos!), and I’m adding new capabilities to the dts2as utility. I’m also watching out for additional ways that new open source tools can improve the workflow with transpiled ActionScript. If you’d love to learn more about how you can keep ActionScript in your workflow (or bring it back!), please support me by becoming a patron . Patreon follows a slightly different model than sites like Kickstarter. Instead of a one-time pledge, Patreon is about more long-term, sustainable funding with small, monthly donations. You’ll get frequent updates about new tutorials and tools as I work on them, and I hope to release some special patron-only exclusives too! It’s easy to sign up and you can cancel at any time. Pledge any amount that you prefer, even as little as a dollar.

Support Josh and the next generation of ActionScript on Patreon

Thank you so much, and happy coding!





About List