DrawingAPI

Can I get this code to be on release erase

 
// 3. BUTTON "ERASE":
// --------------------
buttonErase.onPress = function(){
_root.line.clear();
}
 

I can’t seem to figure it out