2009-12-31 90 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

相关问题