views:

308

answers:

1

Im confused, I passed a matrix datatype into the this.graphics.beginBitmapFill(); and i get Implicit 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.
+1  A: 

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);
Patrick
Yea, I figure it out, thanks for your help though
numerical25