Alright, I’ve had this frustrating problem for a long time and i’ve been asking a lot of people for help about it. For something that sounds so simple, no one could come up for a solution for this, so this must be a REALLY hard button, even if it sounds simple.
Please help? I’m so frustrated and no matter what I do nothing is working, and no one seems to know how to fix it on other flash forums…
I’m trying to make a game in which there’s three unlockable buttons on the main menu. Being unlockable, they are supposed to be disabled on the main menu first. The game uses scenes (bad idea, but already done), and each button is unlocked when a certain scene happens. Having three seperate buttons means they must unlock independently of each other (so no skipping frames to a frame where the button is enabled).
I can disable the button when the main menu first loads, but i’m having a ton of trouble enabling it on a scene seperate from the main menu. I’ve been told the problem is that I hardcoded the button to be disabled on the first frame of the main menu, and once the scene “unlocks” the button by enabling it, it hops back to the first frame of the main menu where the button is hardcoded to be disabled. But no one seems to know how to fix this.
I’ve also been told to make a variable like:
Buttonenabled = true;
if (Buttonenabled) {
button1.enabled = true;
} else {
button1.enabled = false;
}
and turn the variable on or off on the scene, but I wasn’t told where to put the code and how to turn the variable off or on, so I’m at a complete loss how to use it.
Really, I’m so frustrated right now I just want a solution. It doesn’t have to be what i’ve been working on for nearly a month now. Is it really that hard? Enabling a disabled button?
Thanks if anyone manages to figure this out.