# Setproperty

**URL:** <https://forum.kirupa.com/t/setproperty/3403>\
**Category:** Uncategorized\
**Created:** [February 23, 2002, 12:37am UTC](https://forum.kirupa.com/t/setproperty/3403 "2002-02-23T00:37:10Z")\
**Posts on this page:** 15\
**Page:** 1

<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:** [February 23, 2002, 12:37am UTC](https://forum.kirupa.com/t/setproperty/3403/1 "2002-02-23T00:37:10Z")

</div>

hi \rhere i go with another very basic question: \ri made a button called “bverde” - the name the button has on the library - and want to set its visibility to “0” \ri wrote the following action: \ron (release) { \rsetProperty ("\_root.bverde", \_visible, “0”); \r} \rbut it doesnt work at all, i mean, the button keeps visible in the main movie \rwhat am i doing wrong? \ri also tried with: \ron (release) { \rsetProperty (“bverde”, \_visible, “0”); \r} \r\rthanks\r

---

<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:** [February 23, 2002, 2:14am UTC](https://forum.kirupa.com/t/setproperty/3403/2 "2002-02-23T02:14:59Z")

</div>

you have to put the button inside a movieclip. then put this code on the button.\r\ron (release) {\r setProperty ("\_root.bverde", \_visible, “0”);\r}\r\rit worked for me. if you have questions ask away.

---

<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:** [February 23, 2002, 2:38am UTC](https://forum.kirupa.com/t/setproperty/3403/3 "2002-02-23T02:38:15Z")

</div>

Yes,… Jubba is correct, even if he isn’t jubba.\r\ryou CANNOT target buttons.\r\rselect the button. Hit F8, select Movie clip from the popup. You can name it here as well, but this name, in this popup, is not relivant.\r\ropen the “instance” panel. With this new movie clip selected, type in a name in the “instance” panel. This is the instance name, and the one you use for targeting in Flash.\r

---

<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:** [February 23, 2002, 2:41am UTC](https://forum.kirupa.com/t/setproperty/3403/4 "2002-02-23T02:41:46Z")

</div>

hi\rthank you for helping\rdidnt work!\ri made a new film, made a button, made a MC, put the button in the mc, pasted the code to the button action and put the mc on a layer on the main movie, but the button is visible\rwhat am i doing wrong?

---

<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:** [February 23, 2002, 2:55am UTC](https://forum.kirupa.com/t/setproperty/3403/5 "2002-02-23T02:55:34Z")

</div>

you have to give the movie clip an instance name “bverde” without the quotes. select the movieclip on the main stage and press CONTROL+I then in the name box type “bverde” then it will work.

---

<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:** [February 23, 2002, 2:57am UTC](https://forum.kirupa.com/t/setproperty/3403/6 "2002-02-23T02:57:53Z")

</div>

I’ll try to post something in the morning about this, if you haven’t figured it out by then.\r\rFor now, all I can suggest is that you have not named the “instance” name of the movie clip. Remember that the name of a Movie clip in the library is irrelivant for the purposes of targeting. You must open the instance panel, and with that object selected on the stage, place a name in that panel for the object.

---

<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:** [February 23, 2002, 3:15am UTC](https://forum.kirupa.com/t/setproperty/3403/7 "2002-02-23T03:15:18Z")

</div>

hi again\rthanks to everybody trying to help me\rits too late here, so i’ll work it tomorrow, with the head more clear, ok?\rthanks again

---

<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:** [February 23, 2002, 3:27am UTC](https://forum.kirupa.com/t/setproperty/3403/8 "2002-02-23T03:27:57Z")

</div>

i think thats the problem since he(she, it) said that the name in the library was bverde. just doesn’t understand instances. i think thats difficult to explain too, but once you get it, you get it…get it?

---

<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:** [February 23, 2002, 4:15pm UTC](https://forum.kirupa.com/t/setproperty/3403/9 "2002-02-23T16:15:10Z")

</div>

that’s it\rthe only thing is that once the buton gets invisible, doesnt work anymore - disapears forever\rthanks to everyone who helped me

---

<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:** [February 23, 2002, 5:04pm UTC](https://forum.kirupa.com/t/setproperty/3403/10 "2002-02-23T17:04:03Z")

</div>

well wut kind of situation are you using it in? cuz then you can make it reappear. I can help if you tell me how you’re using it.

---

<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:** [February 24, 2002, 4:47pm UTC](https://forum.kirupa.com/t/setproperty/3403/11 "2002-02-24T16:47:45Z")

</div>

If the button is inside a movie clip and you’re making that movie clip \_visible=false, then you are correct, it will disapear unless you have some other action set to make it \_visible=true again.

---

<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:** [February 24, 2002, 5:17pm UTC](https://forum.kirupa.com/t/setproperty/3403/12 "2002-02-24T17:17:44Z")

</div>

> you CANNOT target buttons.  
> Well, you can put that code to your button, and it works perfectly :

```auto
 on (press) {\r\r setProperty (this, _visible, 0);\r\r}

```

Sorry guys.\rpom 0]

---

<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:** [March 22, 2002, 10:58pm UTC](https://forum.kirupa.com/t/setproperty/3403/13 "2002-03-22T22:58:29Z")

</div>

🙂 you are so right POM

---

<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 19, 2002, 1:11am UTC](https://forum.kirupa.com/t/setproperty/3403/14 "2002-04-19T01:11:17Z")

</div>

in flash mx, you can target buttons (hooray!), although they still default to the movie that they’re in’s namespace (“this” refer’s to the movie it’s in).\r\rso … ily’s code will make whatever movie the button’s in invisible, if you tested it by quickly creating a button and cut and pasting the code in, congratualtions, you made \_root invisible. ; )\r

---

<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 28, 2002, 2:04pm UTC](https://forum.kirupa.com/t/setproperty/3403/15 "2002-04-28T14:04:42Z")

</div>

\*\*\*\*ed !\rpom 0]
