我试图在彼此旁边画线,但在分配第二种颜色之前,第一个颜色组的最后一行采用第二个颜色组的颜色。谁能解释一下?
function drawCorner()
{
var corner:Sprite = new Sprite();
corner.graphics.beginFill(0x0, 1.0);
corner.graphics.drawRect(0, 0, 20, 20);
corner.graphics.lineStyle(0, 0x00FF00, 1.0);
corner.graphics.moveTo(1, 13);
corner.graphics.lineTo(13, 1);
corner.graphics.moveTo(6, 13);
corner.graphics.lineTo(13, 6);
corner.graphics.moveTo(11, 13);
corner.graphics.lineTo(13, 11);
corner.graphics.lineStyle(0, 0xFF00FF, 1.0);
corner.graphics.moveTo(0, 13);
corner.graphics.lineTo(13, 0);
corner.graphics.moveTo(5, 13);
corner.graphics.lineTo(13, 5);
corner.graphics.moveTo(10, 13);
corner.graphics.lineTo(13, 10);
corner.graphics.endFill();
addChild(corner);
}