2013-09-22 51 views
0

使用Flashdevelop中,我設法補充AA 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

這是可能的,當你開始八哥舞臺大小是不準確的,

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

我建議你跟蹤階段的傳遞給椋鳥在創作的大小,如果它不對齊的設備大小,那麼你應該延遲一點創建Starling。

+0

對,我需要設置視口 – mirzahat