0

我很困惑,我将矩阵数据类型传递给 this.graphics.beginBitmapFill(); 我得到类型值的隐式强制。下面是我的代码。

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.
4

1 回答 1

1

beginBitmapFill向函数传递一个theMatrix.translate(30,0)不返回任何参数的参数是正常的 ( void)

改为这样做:

theMatrix.translate(30,0);
this.graphics.beginBitmapFill(tileImage,theMatrix);
于 2009-12-31T01:35:40.003 回答