Need help with variables

I want to make it so if they have no lives left it goes to the main menu here is the code i have…

 
if (_root.lives == -1) {
 gotoAndStop("1");
} 

Can anyone tell me what I have done wrong?