嵌入部分
[Embed(source="/../assets/ui/ui.png")] private static const UI_IMAGE:Class;//所有图标 [Embed(source="/../assets/ui/ui.xml",mimeType="application/octet-stream")] private static const UI_XML:Class;// var assets = new TextureAtlas(Texture.fromBitmap(new UI_IMAGE(), false), XML(new UI_XML())); var texturA:Texture = assets.getTexture('bg'); var UI_bg:Image = new Image(texturA);
代替
[Embed(source = "/../assets/ui/BTback.png")] private var BTback:Class; var UI_bg:Image = new Image(Texture.fromBitmap(new bg()));
var UI_bg:Image = new Image(Texture.fromBitmap(new bg()));
http://www.cnblogs.com/adoontheway/tag/Mobile/