开发者

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

开发者 https://www.devze.com 2022-12-15 16:42 出处:网络
Im confused, I passed a matrix datatype into the this.graphics.beginBitmapFill(); and i get Implici开发者_如何学Ct coercion of a value of type. below is my code.

Im confused, I passed a matrix datatype into the this.graphics.beginBitmapFill(); and i get Implici开发者_如何学Ct coercion of a value of type. below is my code.

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

and the followig error sprigs

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


It's normal you are passing to the beginBitmapFill function a parameter theMatrix.translate(30,0) who return nothing (void)

do this instead:

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

精彩评论

暂无评论...
验证码 换一张
取 消