Skip to content

Create a new ActionScript project in Visual Studio Code that targets Node.js

Josh Tynjala edited this page Nov 20, 2017 · 20 revisions
  1. Install the ActionScript & MXML extension for Visual Studio Code.

  2. 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.

  3. Set your workspace's SDK to Apache FlexJS.

  4. Create a file named asconfig.json at the root of your project, and add the following content:

    {
    	"config": "node",
    	"compilerOptions": {
    	},
    	"files":
    	[
    		"src/Main.as"
    	]
    }
  5. Create directory named src.

  6. Inside src, create a file named Main.as, and add the following code:

    package
    {
    	public class Main
    	{
    		public function Main()
    		{
    			console.log( "Hello Node " + process.version );
    		}
    	}
    }

Next Steps

Clone this wiki locally