使用 Flashdevelop,我设法在我的八哥项目中添加了一个 jpg:
[Embed(source = "../../../../lib/table_org_img_retouched_900.png")]
private static const Graphic:Class;
...
// create a Bitmap object out of the embedded image
var sausageBitmap:Bitmap = new Sausage();
// create a Texture object to feed the Image object
var texture:Texture = Texture.fromBitmap(sausageBitmap);
// create a Image object with our one texture
var image:Image = new Image(texture);
//image.width = 1000;
// show it
addChild(image);
我最后得到的是:
https://www.dropbox.com/s/wvqws29tg3sxwzv/starling.png
为什么我的png被切断了?