Delete an mc with a button press?

how come this isn’t working?

on(release){
    _root.terrain.clear = true;
}

“terrain” is the line that is drawn by the mouse and i want to make a button with AS to delete the lines when pressed.