Skip to content

Instantly share code, notes, and snippets.

@illuzor
Created April 2, 2014 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save illuzor/9935679 to your computer and use it in GitHub Desktop.
Save illuzor/9935679 to your computer and use it in GitHub Desktop.
package ru.inspider.site37.tools {
import flash.display.Bitmap;
import ru.inspider.framework.tools.ImageAtlas;
public class Assets {
[Embed(source = "../../../../../assets/atlas.png")]
private static const AtlasImgClass:Class
[Embed(source="../../../../../assets/atlas.xml", mimeType = "application/octet-stream")]
private static const AtlasXMLClass:Class;
private static var _atlas:ImageAtlas;
public static function get atlas():ImageAtlas {
if (!_atlas) _atlas = new ImageAtlas((new AtlasImgClass() as Bitmap).bitmapData, XML(new AtlasXMLClass()));
return _atlas;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment