-
-
Notifications
You must be signed in to change notification settings - Fork 41
Create a new ActionScript project in Visual Studio Code that targets Adobe AIR
-
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.json
at the root of your project, and add the following content:{ "config": "air", "compilerOptions": { "debug": true, "output": "bin/Main.swf" }, "application": "src/Main-app.xml", "files": [ "src/Main.as" ] }
A mobile AIR project targeting iOS or Android should set
config
to"airmobile"
instead. The"air"
value is for a desktop AIR project that targets Windows or Mac. -
Create directory named
src
. -
Inside
src
, create a file namedMain.as
, and add the following code:package { import flash.display.Sprite; import flash.text.TextField; public class Main extends Sprite { public function Main() { var tf:TextField = new TextField(); tf.text = "Hello World"; addChild(tf); } } }
-
Inside
src
, create an AIR application descriptor file namedMain-app.xml
. AIR application descriptors support a wide variety of options, but you may use the following simple content as a starting point:<?xml version="1.0" encoding="utf-8" ?> <application xmlns="http://ns.adobe.com/air/application/24.0"> <id>com.example.Main</id> <versionNumber>0.0.0</versionNumber> <filename>Main</filename> <name>Main</name> <initialWindow> <content>[Content will be replaced by asconfigc]</content> <visible>true</visible> </initialWindow> </application>
See Adobe Help: AIR application descriptor elements for more information about this file.
- 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)