Drawing board undo last pen line?

hey guys i’m currently devolping a drawing board out of flash but i was wondering if you could help me out and instead of erasing all the pen lines drawn just the last pen line drawn,

im using kirupa drawing board tut for the all erase just stuck to gewt the last line erase done please help