Adobe Flash Builder

This document aims to help you set up Flash Builder to use with Starling for desktop and mobile development.

If you find an error or a missing step, or if you have some other suggestion that might make things clearer for beginners, please help us out by enhancing this document! Just hit one of the Edit buttons and write away.

General Setup

Download Flash Builder via Creative Cloud (or directly from here) and launch the installation program.

To all users of MacOS 10.13 (High Sierra): follow the instruction shown in this document to fix compatibility issues.

Updating the AIR SDK

Flash Builder contains an outdated version of the AIR SDK that doesn't work with Starling 2.
Update to the latest version immediately:

  • Download the latest AIR SDK from here.
  • Then, if you are on Windows:
    • Extract the ZIP-file somewhere on your hard drive.
    • In the File Explorer, navigate to the installation directory of Flash Builder, which is typically C:\Program Files\Adobe\Adobe Flash Builder 4.7.
  • If you are on macOS:
    • Mount the .dmg file by double-clicking it.
    • Copy the contents of the DMG file to a location on your hard drive.
    • In Finder, navigate to the installation directory of Flash Builder, which is typically /Applications/Adobe Flash Builder 4.7.
  • Navigate further into eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722
  • You should find a directory called AIRSDK. Rename it to AIRSDK-3.4. You actually don't need it any longer, but we keep it as a backup.
  • Copy the extracted directory from the downloaded AIR SDK (e.g. AIRSDK_Compiler) into this folder and rename it to AIRSDK.
  • If you navigate into AIRSDK now, you should see several files and directories, like ant, asdoc, etc.

So, in a nutshell, we made sure that the AIRSDK folder (hidden deep within the Flash Builder installation directory) contains the very latest AIR SDK.

Updating the Flash Player

Download the latest Flash Player files:

  • Get the latest standalone Flash Player (“Projector”) from here.
  • Download both the “projector content debugger” and the “projector”.
  • Save them somewhere to your disk where you can find them later.

Flash Builder needs to know where to find the Flash Player:

  • Click on “Window - Preferences”
  • In the preferences window, enter “Flash Builder - Debug”
  • Click on “Browse” and choose the debug player you just downloaed (the file ending with sa_debug).
  • Click “OK”

Optional: adding Starling + Samples to your Workspace

Let Flash Builder know where Starling is installed:

  • Open Flash Builder and enter “Preferences - General - Workspace - Linked Resources”.
  • Add a new path variable called STARLING_FRAMEWORK that points to the root of the Starling-Framework directory.

Add the Starling library to your workspace:

  • Click on “File - Import Flash Builder Project …”
  • Select “Project Folder” and navigate to the starling subdirectory of your Starling download.
  • Click “Finish”.

Add the “Demo-Web” project to your workspace:

  • Click on “File - Import Flash Builder Project …”
  • Select “Project Folder” and navigate to the samples/demo_web subdirectory of your Starling download.
  • Click “Finish”.
  • Right-click on the new project in the project pane on the left and click “Debug as - Web Application”.

Add the “Demo-Mobile” project to your workspace:

  • Follow the steps from the “Demo-Web” project, but pick the samples/demo_mobile folder instead.
  • Once the project is part of your workspace, open the file src/Demo-App.xml
  • Change the xmlns value in line two so that it references the same major AIR SDK version that you just installed (e.g. http://ns.adobe.com/air/application/25.0).
  • Right-click on the new project in the project pane on the left and click “Debug as - Mobile Application”.
  • In the “Debug Configurations” Window that will now pop up, choose
    • “Launch Method”: “On AIR Simulator”
    • “Device”: “Apple iPhone 3GS” (or whatever you want)
  • Then click on the “Debug” button in the same Window.
  • Now, the demo should start up!

Creating a Starling project

  • Download Starling and move it to a directory you won't accidentally delete later.
  • Create a new Project in Flash Builder:
    • Click on “File — New — ActionScript Project” for a browser app.
    • Click on “File — New — ActionScript Mobile Project” for a mobile app.
  • Choose a name and location, then click on “Next”.
  • In the “Source Path” tab, click “Add Folder” and choose the folder “starling/src” inside the Starling directory.
  • Click on “Finish”.

Your project is now correctly set up. You will need to add some source code, of course. For starters, you can use the code shown in the Hello World sample that's part of the Starling Manual.

To test the performance of Starling, always make a release build. To do that, click on “Project - Export Release Build” and test the resulting SWF in a release Flash Player (i.e. the Projector).
  manual/adobe_flash_builder.txt · Last modified: 2018/02/08 16:11 by daniel
 
Powered by DokuWiki