Embedding data using metadata

To do quick data embedding, there are hidden tricks !

@:bitmap("gfx/char.png")
class Sheet extends flash.display.BitmapData
{
    
}

@:file("gfx/data.xml")
class SheetXml extends flash.utils.ByteArray
{
    
}

class Main
{
    public static function main()
    {
        var f = new Sheet();//fetches the bitmap !
    }
}

version #17982, modified 2013-03-21 14:50:17 by blackmagic