# Need button control help

**URL:** <https://forum.kirupa.com/t/need-button-control-help/205557>\
**Category:** Uncategorized\
**Created:** [October 30, 2006, 8:12pm UTC](https://forum.kirupa.com/t/need-button-control-help/205557 "2006-10-30T20:12:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren\_E](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Darren\_E](https://forum.kirupa.com/u/Darren_E)\
**Post date:** [October 30, 2006, 8:12pm UTC](https://forum.kirupa.com/t/need-button-control-help/205557/1 "2006-10-30T20:12:38Z")

</div>

I have a movie clip with a button on the main timeline that I want to control in a certain way…

during an on (rollOver) it goes to frame 2 of the main timeline, during an on (rollOut) it returns to frame 1.

On frame 2, there is a level 1 movie clip " clipA " that plays and stops when it reaches the end of the clip.

I need a way to use " on (release) { gotoAndPlay (3) } " but only after ClipA has reached the end of the clip.

I tried to use:

on (release) {  
if (this.\_currentframe == this.\_totalframes) {  
gotoAndPlay(3);  
}  
}

It didn’t seem to work.

Any help would be greatly appreciated!

Darren  
gotoAndPlay
