-
-
Notifications
You must be signed in to change notification settings - Fork 45
Create a new ActionScript project in Visual Studio Code that targets JavaScript and HTML
Josh Tynjala edited this page Nov 22, 2016
·
20 revisions
-
Install the NextGen ActionScript extension for Visual Studio Code.
-
Create a new directory for your project, and open it in Visual Studio Code.
To open a directory, select the File menu → Open... or click Open Folder button in the Explorer pane.
-
Create a file named
asconfig.jsonat the root of your project, and add the following content:{ "config": "js", "compilerOptions": { "debug": true }, "files": [ "src/Main.as" ] } -
Create directory named
src. -
Inside
src, create a file namedMain.as, and add the following code:package { public class Main { public function Main() { var element:HTMLParagraphElement = document.createElement( "p" ) as HTMLParagraphElement; element.textContent = "Hello World"; document.body.appendChild( element ); } } }
-
Inside the project's root directory, create a file named
debug.html, and add the following code:<!doctype html> <html> <head> <meta charset="utf-8"/> <title>Debug</title> <script src="bin/js-debug/library/closure/goog/base.js"></script> <script src="bin/js-debug/Main-dependencies.js"></script> </head> <body> <script> new Main(); </script> </body> </html>
- Adobe AIR (Mobile)
- Adobe AIR (Desktop)
- Adobe Flash Player
- Apache Royale
- HTML and JS (no framework)
- Node.js
- Feathers SDK
- Adobe Animate
- Flex SDK
- Library (SWC)
- Royale Library (SWC)