2009-12-31 8 views
0

Je suis confus, j'ai transmis un type de données matriciel dans this.graphics.beginBitmapFill(); et je reçois la coercition implicite d'une valeur de type. ci-dessous est mon code.1067: Coercition implicite d'une valeur de type void à un type non apparent flash.geom: Matrice

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

et les brins d'erreur followig

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

Répondre

1

Il est normal que vous passez à la fonction beginBitmapFill un paramètre theMatrix.translate(30,0) qui retourne rien (void)

faire ceci:

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

Oui, je comprends, merci pour votre aide si – numerical25