# Button control

**URL:** <https://forum.kirupa.com/t/button-control/218743>\
**Category:** flash\
**Created:** [March 10, 2007, 11:03am UTC](https://forum.kirupa.com/t/button-control/218743 "2007-03-10T11:03:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cew](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cew](https://forum.kirupa.com/u/cew)\
**Post date:** [March 10, 2007, 11:03am UTC](https://forum.kirupa.com/t/button-control/218743/1 "2007-03-10T11:03:26Z")

</div>

I have buttons that when pressed tween over the next 10 frames of the timeline. How do i use actionscrpt so that when the playhead hits a certain frame, it controls another movieclip on the main stage?

When it hits frame 20 i want it to gotoAndPlay(2); of black\_bg movieclip.

:ponder:
