# gotoAndStop in Classes

**URL:** <https://forum.kirupa.com/t/gotoandstop-in-classes/328448>\
**Category:** flash\
**Created:** [May 17, 2012, 6:59pm UTC](https://forum.kirupa.com/t/gotoandstop-in-classes/328448 "2012-05-17T18:59:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MFRS](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MFRS](https://forum.kirupa.com/u/MFRS)\
**Post date:** [May 17, 2012, 6:59pm UTC](https://forum.kirupa.com/t/gotoandstop-in-classes/328448/1 "2012-05-17T18:59:33Z")

</div>

I want my game to go to gameover when i lose all my lives, and for that i used a var in my class called **currentStage**. Then, **when my lives are 0** , i used

```auto
currentStage.gotoAndStop("gameover");

```

Except it won’t work. **It says “called to a undefined gotoAndStop method”**. Any ideas?
