Copy link to clipboard
Copied
Hello, I'm completely new to Flash and well I need some help. I created a page that has static text in the center.
The page has buttons on side and when I rollover a button text appears, but the problem is that when I rollover a button, the static text in the center is there and I want to hide it as I can't read anything because the texts are overlapped.
How do I make the text in the center disappear/hide when I rollover a button and how do I make it reappear when the the mouse is off the button?
I hope what I am explaining makes sense.
You can assign onRollOver and onRollOut code to the buttons to make the text dispappear, but you'll need to make the text a movieclip with an instance name that you can use to target it to turn it invisible. In the simple example below, the button has an instance name of "btn" and the text movieclip has an instance name of "text_mc"
btn.onRollOver = function(){
text_mc._visible = false;
}
btn.onRollOut = function(){
text_mc._visible = true;
}
Copy link to clipboard
Copied
You can assign onRollOver and onRollOut code to the buttons to make the text dispappear, but you'll need to make the text a movieclip with an instance name that you can use to target it to turn it invisible. In the simple example below, the button has an instance name of "btn" and the text movieclip has an instance name of "text_mc"
btn.onRollOver = function(){
text_mc._visible = false;
}
btn.onRollOut = function(){
text_mc._visible = true;
}
Copy link to clipboard
Copied
Thank you very much! It worked~
Copy link to clipboard
Copied
You're welcome
Find more inspiration, events, and resources on the new Adobe Community
Explore Now