Drawing object

i intend to do a drawing object that i can draw a line, circle and erase my drawing.
My “line” button cannot work.
Let’s say if i click “line” button, i drag my mouse then the line will appear follow my drag cursor.
If i click the “oval” button,i drag my mouse on stage .A oval will appear.
Anyonw who know pls help…