# Controlling Button visibility from an external file

**URL:** <https://forum.kirupa.com/t/controlling-button-visibility-from-an-external-file/204802>\
**Category:** flash\
**Created:** [October 23, 2006, 5:59pm UTC](https://forum.kirupa.com/t/controlling-button-visibility-from-an-external-file/204802 "2006-10-23T17:59:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lnewsom](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lnewsom](https://forum.kirupa.com/u/lnewsom)\
**Post date:** [October 23, 2006, 5:59pm UTC](https://forum.kirupa.com/t/controlling-button-visibility-from-an-external-file/204802/1 "2006-10-23T17:59:46Z")

</div>

HI,

I have a site that I am almost done with, but I need to figure out how to control the visibility of certain buttons from an external file (like scroll bars). I have been able to do this with button function using a loaded variable and if statements on button release, but I have been unable to replicate this with visibility. I really need the button to be visible or not from the initial load of the .swf file. Any suggestions? I currently have to open flash and change the action script within the flash file and export a new .swf, and I want to be able to do it by changing a .txt file.

thanks  
Lara

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [October 23, 2006, 6:04pm UTC](https://forum.kirupa.com/t/controlling-button-visibility-from-an-external-file/204802/2 "2006-10-23T18:04:55Z")

</div>

Inside a textfile, or however you want to pass it in just use a 1 or a 0 or something like that. Once the variable is loaded

```auto

if(someVar ==1){
somebutton._visible = true;
}else{
somebutton._visible = false;
}

```

So the answer I think you were looking for was

```auto

something._visible = true;

```

🙂
