移动电话 - 图形被切断

时间:2013-09-22 11:04:36

标签: ios actionscript-3 starling-framework

使用Flashdevelop,我设法在我的starling项目中添加了一个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会被切断?

1 个答案:

答案 0 :(得分:1)

当您开始使用星号时,您的舞台大小可能不准确,

_starling = new Starling(Game, stage);
_starling.start();

我建议您跟踪在创建过程中传递给Starling的舞台的大小,如果它与您的设备大小不一致,那么您应该稍微延迟创建Starling。