Question

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.
Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top