Skip to content

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

Josh Tynjala edited this page Feb 22, 2018 · 22 revisions

Learn to set up a project in Visual Studio Code to create an application that runs on Adobe Flash Player.

Development Setup

  1. Install the ActionScript & MXML 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 in the root directory of your project, and add the following content:

    {
    	"compilerOptions": {
    		"output": "bin/Main.swf"
    	},
    	"files":
    	[
    		"src/Main.as"
    	]
    }
  5. Create directory named src.

  6. Inside src, create a file named Main.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);
    		}
    	}
    }

Next Steps

Clone this wiki locally