| re: Make Buttons disappear
Hi Maril,
Yes it is possible. You just have to put your button inside a movieclip first so you can access it dynamically.
Example:
Create your four buttons, now create a movieclip, place the first button there and name the movieclip btn01. Then create another movieclip, place the second button there and name it btn02. Repeat the steps with the other buttons.So now, you have four buttons and four movieclips. Your movieclip's name should be: btn01,btn02,btn03,btn04. Place the four movieclips on your workarea.
We now have all the objects we need. Let's start coding.
1. Double Click on btn01, It will open the MovieClip, now on the button itself. Put this:
on(RollOver)
{
_root.btn02.alpha=0;
_root.btn03.alpha=0;
_root.btn04.alpha=0;
}
on(RollOut)
{
_root.btn02.alpha=100;
_root.btn03.alpha=100;
_root.btn04.alpha=100;
}
2.Now go back to your main scene. DoubleClick on btn02. On the Second Button put this:
on(RollOver)
{
_root.btn01.alpha=0;
_root.btn03.alpha=0;
_root.btn04.alpha=0;
}
on(RollOut)
{
_root.btn01.alpha=100;
_root.btn03.alpha=100;
_root.btn04.alpha=100;
}
3.For the Third button:
on(RollOver)
{
_root.btn01.alpha=0;
_root.btn02.alpha=0;
_root.btn04.alpha=0;
}
on(RollOut)
{
_root.btn01.alpha=100;
_root.btn02.alpha=100;
_root.btn04.alpha=100;
}
4.And lastly:
on(RollOver)
{
_root.btn01.alpha=0;
_root.btn02.alpha=0;
_root.btn03.alpha=0;
}
on(RollOut)
{
_root.btn01.alpha=100;
_root.btn02.alpha=100;
_root.btn03.alpha=100;
}
5. Run it and see if it works for you.
Well, That's kinda long.. hehe.. Try it first if it works. Hope this helps.
|