Getting FDT setup to run an as3 project
i was trying to get FDT to run a native as3 project this morning. The steps below may indeed help someone or other
1. Set up Eclipse/FDT Preferences
* In Eclipse, open the Preferences panel.
* In the FDT->Core Libraries settings, select the AS3 Core Libraries tab.
* Click the Fast Add… button.
* In the Type drop-down menu, select Pure AS3 (Flex 3) and for the Path field, browse to the directory where you installed the Flex SDK. In my case, I use /usr/local/flex_sdk_3 (figure 1). Click OK.
* Back in the Preferences panel, make sure the Pure_AS3_Flex_3_0 core library is checked. Click OK to exit the Preferences panel.
2. Creating a New AS3 Project
* In the Flash Explorer panel, right-click and select New->New Flash Project.
* In the New Project Wizard, make sure that in the Project Language settings, Action Script 3 is selected and set to Pure_AS3_Flex_3_0 in the drop-down menu. Click Next.
* In the next window, you will see that your project is automatically linked to playerglobal.swc in the Core Library. This SWC contains the Flash core library classes that you would need in order to compile an AS3 application. Click Finish.
* Next, create a source folder by right-clicking on your project and selecting New->Source Folder. Name this folder src and place it in the root of your project directory.
* Create your application (document) class by right-clicking on your project and selecting New->Class. Name your file MyApp.as and make sure that it extends flash.display.Sprite. Click Finish.
* Create a folder named build in the root of your project by right-clicking your project and selecting New->Folder. This will be the output folder for your SWF.
3. Setting up your Run Configurations
* Right-click on the MyApp.as file and select Run As->Run Configurations…
* In the Run panel, with FDT AS3 Application selected, click the New icon to create a new configuration for your build setup.
* With the new configuration selected, in the Main tab, browse to your project MyAS3Project for the Project field, your class src/MyApp.as for the Main Class field and type in build/MyApp.swf for the Output field. Click Apply and then click Run. This will create a default SWF in the build folder.
* In the Start SWF tab, check the Start SWF after compilation box and browse to build/MyApp.swf. This will allow FDT to auto-launch your SWF in the built-in SWF Viewer once it’s compiled. Close the Run panel.
