# Correct use of \_currentframe

**URL:** <https://forum.kirupa.com/t/correct-use-of--currentframe/209477>\
**Category:** programming\
**Created:** [December 9, 2006, 4:30am UTC](https://forum.kirupa.com/t/correct-use-of--currentframe/209477 "2006-12-09T04:30:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holmesc](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@Holmesc](https://forum.kirupa.com/u/Holmesc)\
**Post date:** [December 9, 2006, 4:30am UTC](https://forum.kirupa.com/t/correct-use-of--currentframe/209477/1 "2006-12-09T04:30:43Z")

</div>

Hello! Recently, I found out I could use \_currentframe to check which frame my MC is on. However, when trying to get it to work, my script doesn’t work… Here’s my AC:

```auto

onClipEvent(enterFrame) [
      if(this._currentframe == 5) {
            _root.gotoAndStop("the_crazy_frame_of_coolness");
      }
}

```

The code makes sense, but nothing happens - not even any errors come up! Explanations of this would be much appreciated.😏
