This document aims to help you set up FlashDevelop to use with Starling for desktop and mobile development.
Editbuttons and write away.
starling/srcwithin the Starling download/Git folder. (recommended)
libfolder in your project and copy
starling.swcinto it; then go to “Project → Properties → Compiler Options → SWC Libraries” and add the entry
Open the file
application.xml that's part of your project.
You need to make sure about two things:
xmlnsmust point the same AIR version that you installed via “AppMan”. The sample below shows the value for “AIR 24”.
renderModeis set to
direct. That's required so that Starling may use Stage3D.
<application xmlns="http://ns.adobe.com/air/application/24.0"> <initialWindow> <!-- ... --> <renderMode>direct</renderMode> </initialWindow>
You will want to add files to a project so that they are bundled with the application (allowing you to load them at runtime). In FlashDevelop, that happens with all the files found in the
However, you probably don't want to place your assets in that folder – the bin folder is normally supposed to only contain files that are generated in the build-process.
Instead, I recommend you modify the file
RunApp.bat so that it automatically clears all contents of the
bin folder and then repopulates it with the contents of the
assets folder (that's where you would put your assets).
bat/RunApp.batand find the line that says:
:: Clear bin folder and copy over assets to be packaged. for /D %%p IN ("bin\*.*") DO rmdir "%%p" /s /q xcopy "assets" "bin" /s /c /y /i /q
This batch file is executed when you hit “Test Project” (F5).
:targetcontrols how you want to launch/debug your application. For example,
:desktopcontrols the screen resolution used in the adb debugger.
Any mobile project setup with FlashDevelop will contain a file AIR_iOS_readme.txt. It contains detailed informations about how to work with iOS. Follow these instructions!
Any mobile project setup with FlashDevelop will contain a file AIR_Android_readme.txt. It contains detailed informations about how to work with Android. Follow these instructions!
When I start the debug launcher, it says:
error while loading initial content
You probably forgot to update
application.xml so that it points to the same XML schema version as the AIR SDK you're using. Open it up and change the version number at the end of the
application XML tag.