In flex 3, drawing using the old mx components, there was an easy way to clear the stuff I had drawn, graphics.clear Is there some equivalent to that in the new spark graphics primitives? Say, for the Line class?
If not, how could I clear a bunch of Lines and then redraw a new bunch ?
When you create a bunch of spark graphic primitives (like Line/Rect/etc.) you add them to a spark container like a Group or SkinnableContainer. These spark containers implement IVisualElementContainer which has a removeAllElements() method that you might find useful.
That worked great. I just added all the stuff I knew I wanted to clear to a separate Group, then removed all the elements.