# Check Current Frame;

**URL:** https://forum.kirupa.com/t/check-current-frame/198766
**Category:** flash
**Created:** [August 28, 2006, 1:31pm UTC](https://forum.kirupa.com/t/check-current-frame/198766 "2006-08-28T13:31:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![btibia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/btibia/32/1625_2.png) [@btibia](https://forum.kirupa.com/u/btibia)
#### Post date: [August 28, 2006, 1:31pm UTC](https://forum.kirupa.com/t/check-current-frame/198766/1 "2006-08-28T13:31:46Z")

</div>

Hello guys;

Long time no posts/replys in kirupa, i was in holiday, now i’m back!

Now i come with a problem, i want to check the currentframe of movieclip that it play’s after i press a btn!

my script look something like this:

```auto

sub_meniu.sub2.onPress = function () {
    this._parent._parent._parent.Mcs.play ();
    checkCurrentFrame ();
    //trace(this._parent._parent._parent.targetMc)
    //trace (this._parent._parent._parent.Mcs);
};
function checkCurrentFrame () {
    if (this.Mcs._currentframe >= 90)
    {
        //this._parent._parent._parent.Mcs.removeMovieClip ();
        trace("Frame 90");
    }
    else
    {
        checkCurrentFrame ();
    }
}

```

I have tried the simple way (new file) and added this code:

```auto

function checking ():Void {
    if (this._currentframe == 35)
    {
        stop ();
        trace ("Suntem in frame 3");
    }
    else
    {
        checking ();
    }
}
checking ();

```

in the first keyframe and i get this error!

```auto

256 levels of recursion were exceeded in one action list.
This is probably an infinite loop.
Further execution of actions has been disabled in this movie.

```

Any ideea, help, tip how i can resolve this problem!

Thank you in advanced, btibia
