# The \_visible property

**URL:** https://forum.kirupa.com/t/the--visible-property/17939
**Category:** Uncategorized
**Created:** [April 11, 2003, 12:26am UTC](https://forum.kirupa.com/t/the--visible-property/17939 "2003-04-11T00:26:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![NJusticeForAll2](https://avatars.discourse-cdn.com/v4/letter/n/e19adc/32.png) [@NJusticeForAll2](https://forum.kirupa.com/u/NJusticeForAll2)
#### Post date: [April 11, 2003, 12:26am UTC](https://forum.kirupa.com/t/the--visible-property/17939/1 "2003-04-11T00:26:12Z")

</div>

I looked up the property \_visible on the Action SCript Reference (Shift F1 of Flash MX) and it gave me some info about it, but it didn’t give me a practical code example. Could anybody give me a small, practical code example for that, so I can see how it works?

Bellow is that the reference gave me:

MovieClip.\_visible

Availability

Flash Player 4.

Usage

myMovieClip.\_visible

Description

Property; a Booloean value that indicates whether the movie specified by the MovieClip parameter is visible. Movie clips that are not visible (\_visible property set to false) are disabled. For example, a button in a movie clip with the \_visible property set to false cannot be clicked.

What I’m looking for:  
Would the code work if I just simply typed  
myMovieClip.\_visible=false;  
if I want an object to disapear?

Basicly, what I’m trying to do is… I have a project in which I have dots on the locations in a world map to which a certain organization is going to this year. I’m trying to get it to work with cold fusion, so that if the database on coldfusion says that we are going to that particular city this year (returning true, to Flash), than Flash makes that movie clip (on that location) visible. If it returns false, than the movie clip should disapear on that spot. I was thinking of either using the \_visible property or delete. Does anyone have any ideas pertaining to how I might do that?

My logic right now is the following:

I’m picking up a variable from a text file generated by a Cold Fusion Database that says \_root.myVariableWhichIsNamedMyCOuntryAndCity=true&\_root.mynextVariable=false

so on…

Than it goes like…  
\_root.myContinentMovieClip.mycountryMovieClip.MyCityLittleTargetMovieClip.\_visible = myVariableWhichIsNamedMyCOuntryAndCity;

the above, I’m assuming should equal

\_root.myContinentMovieClip.mycountryMovieClip.MyCityLittleTargetMovieClip.\_visible = true;

am I correct? Could you give me any insight? Any help?

Thank you;

Nathalia

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 11, 2003, 1:25am UTC](https://forum.kirupa.com/t/the--visible-property/17939/2 "2003-04-11T01:25:29Z")

</div>

draw a circle on the stage, convert it to a movieclip, call it ‘circle’, and have this action on the parent timeline

```auto
circle._visible = false

```

🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 11, 2003, 1:34am UTC](https://forum.kirupa.com/t/the--visible-property/17939/3 "2003-04-11T01:34:46Z")

</div>

nathalia -

i don’t know much about coldfusion, but you could probably incorporate it into some kind of if/else statement. e.x.:

[AS]// set city variable  
newYork = true;

if(newYork){  
circle.\_visible = true;  
}else{  
circle.\_visible = false;  
}  
[/AS]

so, say if you were going to new york, then the variable newYork would equal true, then the if/else statement would evaluate this and take the appropriate action of either making the circle visible or invisible.

read up on if/else tests [here](http://www.kirupa.com/developer/actionscript/tricks/simpif.asp)

hope that helps! 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 11, 2003, 9:29am UTC](https://forum.kirupa.com/t/the--visible-property/17939/4 "2003-04-11T09:29:45Z")

</div>

well… unless the coldfusion part of the equation is working without error… then this is a straight a/s problem. 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 14, 2003, 10:58pm UTC](https://forum.kirupa.com/t/the--visible-property/17939/5 "2003-04-14T22:58:29Z")

</div>

a/s problem? What is a/s?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2003, 4:35am UTC](https://forum.kirupa.com/t/the--visible-property/17939/6 "2003-04-15T04:35:47Z")

</div>

```auto
 

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2003, 10:45am UTC](https://forum.kirupa.com/t/the--visible-property/17939/7 "2003-04-15T10:45:39Z")

</div>

Can you write it something like this aswell?

ActionScript:--------------------------------------------------------------------------------// set city variable  
newYork = 1;

if(newYork){  
circle.\_visible = 1;  
}else{  
circle.\_visible = 0;  
}

* * *

Where 1 or true and 0 is false?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 15, 2003, 11:13am UTC](https://forum.kirupa.com/t/the--visible-property/17939/8 "2003-04-15T11:13:43Z")

</div>

yea…it works
