-
Notifications
You must be signed in to change notification settings - Fork 3
Scaffold template
Flair comes up with a light template so you can already compile and test your project when set up.
This template is a great way to start working if you don't want to bother with some common initializations. Here is a listing of what template do for you:
- Initialize native Stage
src/main/actionscript/{packageName}/AMain.as
- Initialize Starling
src/main/actionscript/{packageName}/AMain.as
- Initialize Gestouch
src/main/actionscript/{packageName}/AMain.as
- Initialize Feathers to use TextFieldTextRenderer by default insteadof BitmapTextRenderer
src/main/actionscript/{packageName}/AMain.as
- Stop/resume Starling on deactivate/activate
src/main/actionscript/{packageName}/AMain.as
- Manage splash screens
src/main/actionscript/{packageName}/AMain.as
- Manage device orientation
src/main/actionscript/{packageName}/AMain.as
- Create a main class for each platform you want to target, these class can be retrieve under each platform folder >
src/{platform}/actionscript/{packageName}/Main{platform}.as
- Create a Starling main class
src/main/actionscript/{packageName}/view/StarlingMain.as
- Create 2 demo screens
src/main/actionscript/{packageName}/view/home/HomeScreen.as
andotherScreen/OtherScreen.as
You may delete these files if you want to start on your own but keep in mind if you want to use Flair resource management your Starling main class should inherit from AResourceScreen
, AResourceScrollScreen
or AResourcePanelScreen
.
Note Starling is initialized to scale stage depending on current device bucket (mdpi, xhdpi, etc...) with mdpi as the reference. This means all positioning and sizing need to be set for mdpi, for example:
myDisplayObject.x = 50;
is convert to
- ldpi > 37.5 (x0.75)
- mdpi > 50 (x1)
- hdpi > 75 (x1.5)
- xhdpi > 100 (x2)
- xxhdpi > 300 (x3)
- xxxhdpi > 400 (x4)
If your mockups are designed for xxhdpi, you'll need to divide by 3 all positioning and sizing from your mockup.