Skip to content

01 Creating an Extension

Robert Silverton edited this page Jul 3, 2014 · 5 revisions

If you're working with the tutorial repo, open a Git Shell in the CoreEditor-HelloWorld-Example-as folder and run the following command:

git checkout -f step-1
  • import the HelloWorldExtension ActionScript project from that folder into your editor workspace.
  • Skim through the details below or skip straight to the Build & Run section.

Otherwise, follow the setup instructions below:


Setup

  • Create a new Actionscript project.

  • Call it HelloWorldExtension and click 'Finish' to exit the wizard.

  • Open the project's properties.

  • On the left hand menu, select 'ActionScript Build Path'

  • Change the 'Output folder' to: ${DOCUMENTS}\CoreEditor-as\deploy\extensions

  1. On the right-hand pane, select the ‘Library Path’ tab.
  2. Click Add Project
  3. Select CoreApp, and click ok.
  4. Click Add Project
  5. Select CoreEditor, and click ok.
  • On the left hand menu, select 'ActionScript Compiler'.
  1. Turn off 'Copy non-embedded files to output folder'
  2. Turn off 'Generate HTML wrapper file'.
  3. Set the 'Additional compiler arguments' field to the following text. Discarding any existing values.
-keep-as3-metadata Serializable
  • Close the project properties panel.

  • In the HelloWorldExtension.as file, add the following code to the constructor.
trace("Hello World");

Build & Run

  • Build the project. (CTRL+B);
  • If not already present, add the following line to "CoreEditor/deploy/config.xml".
<extension url="extensions/HelloWorldExtension.swf" />
  • Select the CoreEditor_AIR Project in the package explorer.
  • Click Run->Debug->CoreEditor_AIR
  • You should see "Hello World" traced out into Flash Builder as the application loads.

< Previous | Next >