You have to declare a variable to store the lives in, which are just numbers, and decrease that variable by one when you lose a life. In the code, where it makes you lose a life, check if the life variable is equals to 0, and if it is, go to another frame

If you didn't understand anything, please post the FLA file, and I'll help you