-
-
Notifications
You must be signed in to change notification settings - Fork 39
Build an ActionScript project in Visual Studio Code
The NextGen ActionScript extension for Visual Studio Code supports building SWF files for Adobe AIR and Flash Player, and it can also build Apache FlexJS applications that run in web browsers without a plugin.
To build a project in Visual Studio Code, you will need to configure your workspace's SDK and to create an asconfig.json file for one of the supported project types.
Install the asconfigc utility from npm. This requires Node.js version 6 or newer.
npm install -g asconfigc
The extension will use asconfigc to read the project's asconfig.json file and run the compiler using the specified options.
Go to the Tasks menu and select Run Build Task...
Alternatively, use the Ctrl+Shift+B keyboard shortcut (or Command+Shift+B on macOS).
A list of available tasks for ActionScript projects will appear, and you can choose between a debug or release build.
If you don't see these tasks, you may have forgotten to create an asconfig.json file for your project.
The extension will run the compiler from your workspace's SDK using asconfigc.
In the following section, you'll learn how to make one of these options into the default build task so that you don't need to select one every time.
If a default build task is set, it runs automatically with the Ctrl+Shift+B keyboard shortcut (or Command+Shift+B on macOS).
-
Go to the Tasks menu and select Configure Default Build Task.
-
From the list of available tasks, choose ActionScript: debug build using asconfig.json
-
The following document will open in your editor:
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "type": "actionscript", "debug": true, "group": { "kind": "build", "isDefault": true } } ] }
-
Above the line where it says
"type": "actionscript"
, insert the following field:"identifier": "build-debug",
You can use this identifier later to tell Visual Studio Code to build the project before launching the debugger.
-
To build your project, press Ctrl+Shift+B (or Command+Shift+B on macOS). You will no longer be prompted to choose between a debug and release build.
If you need to run a release build, go to the Tasks menu and choose Run Task.... You will be given the list of all available tasks to choose from.
- Adobe AIR (Mobile)
- Adobe AIR (Desktop)
- Adobe Flash Player
- Apache Royale
- HTML and JS (no framework)
- Node.js
- Feathers SDK
- Adobe Animate
- Classic Flex SDK
- Library (SWC)
- Royale Library (SWC)