Visibility button won't work correctly?
Hello. I am using Adobe Flash Pro CS6.
Right now I am trying to make three buttons that show only one movie clip and hide other two movie clips.
My layer structure is like this.
Button (which has tree button instances)
a_mc(wich has a 80 frames movie clip)
b_mc(same as a_mc)
c_mc(same as a_mc)
And the script is like this.
Button 1has this script.
on(release)
{
_root.a_mc._visible = true;
_root.b_mc._visible = false;
_root.c_mc._visible = false;
}
Button 2 has this script.
on(release)
{
_root.a_mc._visible = false;
_root.b_mc._visible = true;
_root.c_mc._visible = false;
}
Button 3 has this.
on(release)
{
_root.a_mc._visible = false;
_root.b_mc._visible = false;
_root.c_mc._visible = true;
}
Three clips are 80 frames long, and I let them play all the time, but when I push the Button2 or 3 to hide other 2 clips, it hides them, but when the playback time comes back to frame 1, the visibility setting is reset. For example, I push the Button 2 and hide a_mc and c_mc clips and show only the b_mc, but when the current time comes back to 1 frame, visibility setting is reset and it shows a_mc and of course a_mc clip hides b_mc clip. Do you know why the visibility setting is reset? Please tell me what is the problem in my script.Thank you in advance.
