Show/hide dynamic text box on button release

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

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

sound_off

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:


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

but does not seem to work.

Any help would be great :slight_smile: