Gaps/overlaps with different colored fills

I’m trying to make an app that draws 3D objects like in senoculars tutorial, but I’m having problems: basically, i’ll use graphics.beginFill to fill in my triangles, but if the colors are different i’ll sometimes have a gap or overlap with triangles that share an edge. here’s an example-


graphics.beginFill(0x0000ff)
graphics.moveTo(10,10)
graphics.lineTo(100,10)
graphics.lineTo(10,100)
graphics.lineTo(10,10)
graphics.endFill()
graphics.beginFill(0xff0000)
graphics.moveTo(100,100)
graphics.lineTo(100,10)
graphics.lineTo(10,100)
graphics.lineTo(100,100)
graphics.endFill()
graphics.beginFill(0xff0000)
graphics.moveTo(110,10)
graphics.lineTo(200,10)
graphics.lineTo(110,100)
graphics.lineTo(110,10)
graphics.endFill()
graphics.beginFill(0x0000ff)
graphics.moveTo(200,100)
graphics.lineTo(200,10)
graphics.lineTo(110,100)
graphics.lineTo(200,100)
graphics.endFill()

when i run that, there’s a thick purple line between the triangles on the left and a gap between the ones on the right. does anyone else have this problem if they run the above code? or is my comp/screen just screwed up?