2009-12-31 61 views
0

我感到困惑,我將一個矩陣數據類型傳遞給this.graphics.beginBitmapFill();並且我得到了一個類型值的隱式強制。下面是我的代碼。1067:對無關類型的void類型的值的隱式強制flash.geom:Matrix

var theMatrix:Matrix; 
      theMatrix = new Matrix(); 
      this.graphics.beginBitmapFill(tileImage,theMatrix.translate(30,0)); 
      this.graphics.endFill(); 

和followig錯誤小枝

1067: Implicit coercion of a value of type void to an unrelated type flash.geom:Matrix. 

回答

1

這是正常的你傳遞給beginBitmapFill函數中的參數theMatrix.translate(30,0)誰返回任何結果(void

做到這一點,而不是:

theMatrix.translate(30,0); 
this.graphics.beginBitmapFill(tileImage,theMatrix); 
+0

是的,我知道了,謝謝你的幫助 – numerical25 2009-12-31 01:51:53

相關問題