我正在尝试将影片剪辑附加到多个颈背主体,但出现以下错误。
Line 118 1067:
Implicit coercion of a value of type flash.display:MovieClip
to an unrelated type nape.shape:Shape.
这是代码块:
for (var i:int = 0; i < 10; i++)
{
var brick:Body= new Body(BodyType.DYNAMIC);
var brickShape:Polygon = new Polygon(Polygon.box(10,30));
brick.position.setxy(500, ((h ) - 32 * (i + 0.5)));
var brickMovieClip:MovieClip = new Brick();
brickMovieClip.width = 10;
brickMovieClip.height = 30;
addChild(brickMovieClip);
brick.shapes.add(brickMovieClip);
brick.space = space;
brick.shapes.at(0).material.elasticity = .1;
}
如果您知道如何解决此问题,我们将不胜感激。