SomaAssets is a plugin based on the AssetLoader library to easily access to your assets and effectively integrate them in your SomaCore application with paths and automatic mapping name generation for injection.
Special thanks to Matan for his help with the AssetLoader and his joy in general, a pleasure to “meet” him.
You can read the SomaAssets wiki section to get started with it, but I’ll post below a few hints of what you can easily do with it within a SomaCore application.
createPlugin(SomaAssets, new SomaAssetsVO(this, "xml/assets_config.xml"))
Easily retrieve the assets with paths through the XML config.
var image:Bitmap = assets.getAssets("group0/group00/img0");
Easily retrieve the plugin, main loader, config and assets with injection in a SomaCore application. The following mapping names have been automatically generated from the XML config.
[Inject(name="assets")] public var plugin:SomaAssets; [Inject(name="assets")] public var loader:IAssetLoader; [Inject(name="group0/group00/img0")] public var loaderType1:ImageLoader; [Inject(name="group0/group00/img0")] public var assetType1:Bitmap;