xml - Embedding font in AS3 classes -


i newbie on as3,the problem facing is,i trying embed font in game.i have embeded font png , xml in assets.as as

[embed(source = "../media/font/font.png")]           public static const font:class;          [embed(source="../media/font/font.fnt",mimetype="application/octet stream")]         public static const fontxml:class;  

i have used font , fontxml in hud.as 's onadded stage function somthing

var bitmap:bitmap = new font(); //error var texture:texture = texture.frombitmap(bitmap); var xml:xml = xml(new fontxml()); //error 

but font , fontxml creating poblem,the error "type not found or not compile-time constant: font" cannot find solution error,any suggestions?

when calling public static function or property class, must specify class belongs to:

new assets.font(); 

Comments