-
-
Notifications
You must be signed in to change notification settings - Fork 39
Build an ActionScript project in Visual Studio Code
The ActionScript & MXML extension for Visual Studio Code supports building SWF files for Adobe AIR and Flash Player, and it can also build Apache Royale 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.
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 (you may see some additional tasks too):
If you don't see these tasks, you may have forgotten to create an asconfig.json file for your project.
You may choose to compile a debug or release build of your project.
When you select a task, Visual Studio Code will run the compiler from your workspace's SDK using the options specified in asconfig.json.
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: compile debug build
-
The document similar to the following 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.
After you've made compiling a debug build your default task, you may still occasionally need to run other tasks, such as compiling a release build or packaging an Adobe AIR application. To see the complete list of tasks again, go to the Tasks menu and choose Run Task....
- 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)