Skip to content

Create a new ActionScript library project in Visual Studio Code

Josh Tynjala edited this page Sep 18, 2017 · 11 revisions
  1. Install the NextGen ActionScript 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. Choose an ActionScript SDK for your workspace.

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

    {
    	"type": "lib",
    	"compilerOptions": {
    		"source-path": [
    			"src"
    		],
    		"include-sources": [
    			"src"
    		],
    		"output": "bin/MyLibrary.swc"
    	}
    }

    Alternatively, you may use the include-classes or include-namespaces compiler options to include code in your library. See Library Compiler Options for asconfig.json for details.

    To include the Adobe AIR libraries, set the config field to "air" or "airmobile":

    {
    	"type": "lib",
    	"config": "airmobile",
    	"compilerOptions": {
    		"source-path": [
    			"src"
    		],
    		"include-sources": [
    			"src"
    		],
    		"output": "bin/MyLibrary.swc"
    	}
    }
  5. Create directory named src.

  6. Inside src, create any classes that you want to include in the library SWC.

Next Steps

Clone this wiki locally