-
Notifications
You must be signed in to change notification settings - Fork 3
Utils from Flair library
In addition with resource management Flair actionscript library comes up with a bunch of tools, here what you may used:
- flair.resources.CacheAssetManager class
This class inherit from Starling AssetManager
and add ability to cache files load externally so they will be loaded locally next time you request them.
- flair.utils.device package
Contains global function to retrieve which platform is currently running (iOS, Android, Windows, etc...). Contains as well a global variable to get current locale (en_US, fr_FR, etc...)
- flair utils.diaplayMetrics package
Contains global functions/variable to work with device dpi.
- flair utils.math package
Contains replacement for Math.round
, Math.ceil
and Math.floor
with better performance.
- flair.utils.OrientationManager class
Class to listen for orientation changed (this works even if autoOrients
has been set to false in your app descriptor).
- flair.utils.stringify global function
Convert an object into a readable string.
var o : Object = new Object();
o.hello = "world";
o.value = 10;
o.data = [ "a" , "b" , "c" ];
trace( stringify( o ) );
// output
[$stringify
{ #0
- value : int = 10
- data : Array =
{ #1
- 0 : String = a
- 1 : String = b
- 2 : String = c
}
- hello : String = world
}
]