class FlxAssets
package flixel.system
Static variables
staticdefaultSoundExtension:String = "ogg"
The default sound format to be assumed when unspecified, only affects calls to
FlxAssets.getSound which are not common. Currently set to ".ogg" on non-flash targets
for backwards compatibility reasons.
Static methods
staticinlinegetBitmapFromClass(source:Class<Dynamic>):BitmapData
Generates BitmapData from specified class. Less typing.
Parameters:
source | BitmapData class to generate BitmapData object from. |
|---|
Returns:
Newly instantiated BitmapData object.
staticgetSound(id:String):Sound
Loads an OpenFL sound asset from the given asset id. If an extension not provided the
defaultSoundExtension is used (defaults to "ogg" on non-flash targets).
Parameters:
id | The asset id of the local sound file. |
|---|
Returns:
The sound file.
staticresolveBitmapData(Graphic:FlxGraphicSource):BitmapData
Takes Dynamic object as a input and tries to convert it to BitmapData:
1) if the input is BitmapData, then it will return this BitmapData;
2) if the input is Class
Parameters:
Graphic | input data to get BitmapData object for. |
|---|
Returns:
BitmapData for specified Dynamic object.
staticresolveKey(Graphic:FlxGraphicSource, ?Key:String):String
Takes Dynamic object as a input and tries to find appropriate key String for its BitmapData:
1) if the input is BitmapData, then it will return second (optional) argument (the Key);
2) if the input is Class
Parameters:
Graphic | input data to get string key for. |
|---|---|
Key | optional key string. |
Returns:
Key String for specified Graphic object.