# Show/hide dynamic text box on button release

**URL:** <https://forum.kirupa.com/t/show-hide-dynamic-text-box-on-button-release/255623>\
**Category:** flash\
**Created:** [March 25, 2008, 1:36pm UTC](https://forum.kirupa.com/t/show-hide-dynamic-text-box-on-button-release/255623 "2008-03-25T13:36:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![punky79](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@punky79](https://forum.kirupa.com/u/punky79)\
**Post date:** [March 25, 2008, 1:36pm UTC](https://forum.kirupa.com/t/show-hide-dynamic-text-box-on-button-release/255623/1 "2008-03-25T13:36:00Z")

</div>

I have 2 buttons called “sound\_on” and “sound\_off”. When these are clicked a sound either stops or starts.

Here is the actionscript code attached to each button:

sound\_on

```auto
on (release){
    x.stop();
    x.start(0,0);
}

```

sound\_off

```auto
on (release){
    x.stop();
}

```

varible “x” is my sound.

I want to add code to hide the dynamic text box when “sound\_on” is pressed and to show the dynamic text box when “sound\_off” is pressed. The name of my dynamic text box is “my\_text”

I have tried this:

```auto

on (release){
    x.stop();
    x.start(0,0);
    my_text._visible = false;
}
}

```

but does not seem to work.

Any help would be great 🙂
