Skip to content
Robert Silverton edited this page Jul 8, 2014 · 2 revisions

You will need a working build of CoreEditor set-up in FlashBuilder before you can use the CadetEditor Extension. Details of how to do this can be found in the Getting Started CoreEditor tutorial.


Essential GitHub Repositories

Additionally, you will need the following GitHub repositories checked-out on your machine, ideally into the same folder you checked out the CoreEditor repositories into.

Starling

Cadet

After checking these out, add each one as a project to FlashBuilder. It’s advisable to add them in the same order as above, as FlashBuilder may exhibit a bug where it doesn't realise a previously missing library project has now been added.


Import AS3 Projects Into Your Editor Workspace

The CadetEngine2D libraries are dependent on Starling, if you have already completed the CadetEngine tutorials, you will be familiar with importing the following:

[Starling-Framework]/starling
[Starling-Extension-Graphics]/extension
[Starling-Extension-Particle-System]

Next import the base CadetEngine library, plus 2D rendering via Starling and physics via Box2D:

[CadetEngine-as]/cadet
[CadetEngine-as]/cadet2d
[CadetEngine-as]/cadet2dBox2d

Then the base CadetEditor library, plus 2D rendering via Starling and physics via Box2D:

[CadetEditor-as]/cadetEditor
[CadetEditor-as]/cadetEditor2D
[CadetEditor-as]/cadetEditor2DS
[CadetEditor-as]/cadetEditor2DBox2D
[CadetEditor-as]/cadetEditor2DSBox2D

And finally the base CadetEditor extension and the CadetEditor2D extensions, which contribute code in the above libraries to the CoreEditor:

[CadetEditor-as]/cadetEditor_Ext
[CadetEditor-as]/cadetEditor_Ext_2DS
[CadetEditor-as]/cadetEditor_Ext_2D_Box2D
[CadetEditor-as]/cadetEditor_Ext_2D_Geom

CadetEditor Configuration

Once you've added all projects and built them, open up the properties for the CoreEditor_AIR project. When the Core app runs, it looks for a file sat next to it called config.xml. This file contains details of the extensions Core should load, and also what style and file system providers to employ.

We can pass in a path to a different config file to force core to configure itself differently. We will do this now so that we can choose to launch CoreEditor using a config file that loads the CadetEditor Extensions.

Open the properties for the CoreEditor_AIR project. Select ‘Run/Debug Settings’ from the left hand menu. There should be an existing launch configuration called CoreEditor_AIR in the right hand list. Select this, then click ‘Duplicate’ on the right.

With the duplicated launch configuration selected, click ‘Edit…’ also on the right. At the top, give this launch configuration the name CoreEditor_AIR_CadetEditor, and add the following text to the ‘Command line arguments’ field:

cadetEditor2DSConfig.xml

If you’re wondering where this cadetEditor2DSConfig.xml file has come from – it’s actually already included in the CoreEditor_AIR GitHub repository.

Click OK to close this panel, and then click OK again to close the project properties panel.

Build & Run

Now when you launch the CoreEditor_AIR project, you will be given a choice of launch configurations (right click on project > Run As > Desktop Application). Make sure you choose CoreEditor_AIR_CadetEditor then click ok. CoreEditor should now launch fully configured with the CadetEditor Extension.


Next >