# \_root.main.\_currentframe help

**URL:** <https://forum.kirupa.com/t/-root-main--currentframe-help/92241>\
**Category:** Uncategorized\
**Created:** [October 14, 2003, 10:04pm UTC](https://forum.kirupa.com/t/-root-main--currentframe-help/92241 "2003-10-14T22:04:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kev](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kev](https://forum.kirupa.com/u/kev)\
**Post date:** [October 14, 2003, 10:04pm UTC](https://forum.kirupa.com/t/-root-main--currentframe-help/92241/1 "2003-10-14T22:04:32Z")

</div>

(Flash 5)

Hi all is there a way to have instead of this code which is in a button:

[AS] if (\_root.main.\_currentframe == 25) {  
tellTarget ("\_root.main") {  
play ();  
}  
if (\_root.main.\_currentframe == 55) {  
tellTarget ("\_root") {  
gotoAndPlay (35);

```
    }
}

```

[/AS]

I can see why it does not work beause I have told that mc to play and the action to see if it has reached frame 55 was actioned before it reaches frame 55.

I need something like this:

[AS] if (\_root.main.\_currentframe == 25) {  
tellTarget ("\_root.main") {  
play ();  
}  
when (\_root.main.\_currentframe == 55) {  
tellTarget ("\_root") {  
gotoAndPlay (35);

```
    }
}

```

[/AS]

So basically is there action script to say, when an mc reaches a certain frame go and do something else from a button.

Hope it makes sense

Thanks

kev
