# Toggle button text

**URL:** <https://forum.kirupa.com/t/toggle-button-text/305064>\
**Category:** flash\
**Created:** [February 18, 2010, 6:08pm UTC](https://forum.kirupa.com/t/toggle-button-text/305064 "2010-02-18T18:08:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)\
**Post date:** [February 18, 2010, 6:08pm UTC](https://forum.kirupa.com/t/toggle-button-text/305064/1 "2010-02-18T18:08:38Z")

</div>

I have a button that when clicked once reaveals a portion of an image and when clicked again covers the image back up. That part is working. Now I need the text on the button itself to toggle from saying “show” to “hide”. I am thinking that I can do this on the timeline of the button itself.

I have the myButton.gotoAndStop(“framelabel”) on the main timeline. But I get the following error. Can I control the timeline of a button, basically telling the button to act as if the mouse click is being held down?

1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:SimpleButton.
