I want my movie clip to dissappear on button rollover

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?

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]

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

edit u beat me :frowning: lol

hehee yeah I did! :slight_smile:
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? :-\

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…

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?

on each of the buttons, put:

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 :slight_smile:

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

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

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?

try replacing _root with _parent then!

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

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?

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

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

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!!