I am not sure I understand what you are doing, but here is a thought:
You can't move a line using graphics.moveTo
-- that is an instruction to position the drawing API for subsequent path instructions. If you were to line.graphics.lineTo(300,4000)
, it would draw a line from the last graphic instruction to that coordinate (within the Shape's coordinate system).
To move a Shape, you must set the x and y position of the shape instance (in this case myShapes[2].line
)
If you post more info, I can try and assist more.