Skip to content

Create a new ActionScript project in Visual Studio Code that targets Adobe Flash Player

Josh Tynjala edited this page Oct 13, 2016 · 22 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. Create a file named asconfig.json at the root of your project, and add the following content:

    {
    	"config": "flex",
    	"compilerOptions": {
    		"debug": true
    	},
    	"files":
    	[
    		"src/Main.as"
    	]
    }
  4. Create directory named src.

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

    package
    {
    	import flash.display.Sprite;
    	import flash.display.TextField;
    
    	public class Main extends Sprite
    	{
    		public function Main()
    		{
    			var tf:TextField = new TextField();
    			tf.text = "Hello World";
    			addChild( tf );
    		}
    	}
    }

Next Steps

  • Create tasks.json to compile an ActionScript project

Debugging Adobe Flash Player projects with the NextGen ActionScript extension for Visual Studio Code is not supported at this time.

Clone this wiki locally