Hello,
For some reason, I can't make my invisible button from an initial
keyframe become visible after completing a series of functions. Below
is the code that I have...
btnNext._visible = false;
var Area = [false, false, false, false, false];
function checkViewed() {
var allViewed = true;
for (var i in Area) {
if (Area[i] == false) {
allViewed = false;
break;
}
}
if (allViewed) {
btnNext._visible = true;
}
}
btn1.onRelease = function() {
Area[0] = true;
checkViewed();
};
btn2.onRelease = function() {
Area[1] = true;
checkViewed();
};
btn3.onRelease = function() {
Area[2] = true;
checkViewed();
};
btn4.onRelease = function() {
Area[3] = true;
checkViewed();
};
btn5.onRelease = function() {
Area[4] = true;
checkViewed();
};
btnNext.onPress = function() {
gotoAndStop("play");
};
If you want to see the .fla, you can get it at
http://www.kirupa.com/forum/showthread.php?t=314245
where I posted it on a thread there.
If you have anything that I can use to help me fix this problem, I
would really appreciate it.
Sincerely,
TDP