If I skin a button and use the AS3 graphice.clear() and graphics.lineTo and beginFill to create a shape, the button overlaps other items in the container.
When I use the and mxml to create the same shape, the button is neatly positioned inside the container.
Why is that?
Because the Line Object is doing a bunch of checks and extra work you aren’t doing when you use the Graphics object. Look at the code for spark.primitives.Line to see what its doing that you aren’t.