I have written this script for a button to turn a movie clip on or off. I want it to set the movie clip’s opacity to 0 if it is already at 100 or to 100 if it is already at 0. But it will only set it to 0 if it is 100. Can anyone tell me why my script doesn’t work? Thank you.
If you really want to make your clip invisible (_alpha = 0 can be seen on 16bit color), you can use the _visble property…
[AS]on(release) {
//if Highlights _visible property is true
if (Highlights._visible) {
//make set it to false to hide the clip
Highlights._visible = false;
HighlightsButton._alpha = 50;
} else {
//else set it to true to make it reappear
Highlights._visible = true;
HighlightsButton._alpha = 100;
}
}[/AS]
Great, that’s even better. I didn’t know alpha could be seen on 16bit display so alpha was the only way i could think of to turn the clip off. Thank you for the help. It work right now.
I did try the == before but it still didn’t work. Was that because i was using setProperty along with the .syntax on the line above?