# I want my movie clip to dissappear on button rollover

**URL:** <https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494>\
**Category:** flash\
**Created:** [July 23, 2003, 5:02pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494 "2003-07-23T17:02:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbadmilkman](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bigbadmilkman](https://forum.kirupa.com/u/bigbadmilkman)\
**Post date:** [July 23, 2003, 5:02pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/1 "2003-07-23T17:02:42Z")

</div>

I have a problem, i have a movie clip at the side of the screen, and i want it to disappear when the user rolls their mouse over a button, how would i go about doing this? I’ve tried nothing and I’m all out of ideas does anybody know?

---

<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:** [July 23, 2003, 5:07pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/2 "2003-07-23T17:07:47Z")

</div>

The easiest way is to make a movieClip instead of a button!  
[you can convert the btn into an mc or just make an mc]  
the add these actions to the movieClip:

[AS]  
this.onRollOver = function() {  
this.\_visible = false;  
}  
//and if you want the button to reappear when the mouse rolls out…  
this.onRollOut = function() {  
this.\_visible = true;  
}[/AS]

---

<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:** [July 23, 2003, 5:08pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/3 "2003-07-23T17:08:44Z")

</div>

```auto
on (rollOver) {
_root.movieclip._visible = false;
}
on (rollOut) {
_root.movieclip._visible = true;
}

```

edit u beat me ☹ lol

---

<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:** [July 23, 2003, 5:10pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/4 "2003-07-23T17:10:40Z")

</div>

hehee yeah I did! 🙂  
But I’m not sure it can be done the way you discribed because if there is no button for the cursor to roll out of, it won’t reappear! …or will 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:** [July 23, 2003, 5:18pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/5 "2003-07-23T17:18:43Z")

</div>

u put that on the button, because he wanted the movieclip to appear and disappear, not the button, or at least that’s how i understood 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:** [July 23, 2003, 5:18pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/6 "2003-07-23T17:18:47Z")

</div>

Okay, i don’t know \*\*\*\* about flash so u have to tell me like I am a baby. Let me explain what i want.

I have buttons at the side, and in the middle i have a welcome message, i want the welcome message to disappear every time the user rolls over the buttons, and preferably i would want the welcome message to re-appear when nothing is being rolled over.

Could u tell me like I am a baby how this can be done?

---

<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:** [July 23, 2003, 5:24pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/7 "2003-07-23T17:24:12Z")

</div>

on each of the buttons, put:

```auto
on (rollOver) {
_root.WELCOMEMCINSTANCENAME._visible = false;
}
on (rollOut) {
_root.WELCOMEMCINSTANCENAME._visible = true;
}

```

syko, yeah, ur right… i just tested making the mc invisible when u put ur mouse over it, and visible when u dont, i nearly gave myself a seizure lol  
but to make it invisible via a button, this 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:** [July 23, 2003, 5:26pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/8 "2003-07-23T17:26:15Z")

</div>

oops! Didn’t read it right! Yeldarb is right! Use his code!

Just replace \_root.mvoieclip with the movieclip you want to disappear!

---

<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:** [July 23, 2003, 5:36pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/9 "2003-07-23T17:36:48Z")

</div>

Okay yaldarb you were correct, it worked great but i have anther problem. The file that I was working on is an external flash file for my main interface, so it is displayed in a content mc in the middle of my interface, anyway, when i run the external by itself, the rollover thing that u told me works great, and it appears and reappears fine, but when i run the page in my main interface, it doesn’t seem to work, does anybody know why this it doesn’t 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:** [July 23, 2003, 5:40pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/10 "2003-07-23T17:40:37Z")

</div>

try replacing \_root with \_parent then!

---

<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:** [July 23, 2003, 5:41pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/11 "2003-07-23T17:41:12Z")

</div>

my guess would be that the path is no longer correct, i’m not sure, but try  
\_root.swfinstance.movieclip.\_visible = true/false

that works too lol

---

<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:** [July 23, 2003, 5:51pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/12 "2003-07-23T17:51:06Z")

</div>

swopping parent with root didn’t work!

Yeldarb, isn’t that the same code u gave me earlier. My movie instance name is welcome, and my movie name is welcomemessage, so what would be the actionscript that i should try in my buttons?

---

<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:** [July 23, 2003, 6:12pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/13 "2003-07-23T18:12:30Z")

</div>

no i’m talking about the name of the entire thing, that u name in the main movie  
so it would be  
\_root.FILENAME.WELCOME.WELCOMEMESSAGE.\_visible = true/false

im not sure tho

---

<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:** [July 23, 2003, 7:15pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/14 "2003-07-23T19:15:04Z")

</div>

If your welcome message is in the main movie try replacing \_root with \_level0 so the line becomes…  
[AS]on (rollOver) {  
\_level0.WELCOMEMCINSTANCENAME.\_visible = false;  
}  
on (rollOut) {  
\_level0.WELCOMEMCINSTANCENAME.\_visible = true;  
}  
[/AS]

Those are zeros not the letter o by the way.

HTH  
Liz

---

<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:** [July 23, 2003, 7:18pm UTC](https://forum.kirupa.com/t/i-want-my-movie-clip-to-dissappear-on-button-rollover/26494/15 "2003-07-23T19:18:05Z")

</div>

Thanks, I managed to solve the problem with help from lost in beta, u simply remove the root and it works fine. Thanks for ur suggestions and help guys I really appreciate it!!
