This is my second file - problems trying to make the message appear

it is me, again. this is my second file with different conditons. i have tried to make the message appear when the button is clicked on but in vain.

my objectivity is to make the “sorry.try again” message appear if the wrong button is clicked. 2 last tries will be given a chance. if stilll the third attempt is wrong, the answer message will appear.

i think that i write wrong conditions so can u take a look at my file? my file is very simple and not messy at all. so can u tell me what conditions to write after u take a look at my file. thanks!

i will greatly appreciate it if you can help me with this because i really need to get it running for my major project. thanks!

i forget to write down that i am using flash mx.

i’m not sure about the hitarea thing because i’ve never used it before but why dont’ you use onRelease? oh yea and the 2 try thing, you can make a variable and add one to it after each click. and when that variable reaches 3 or something you could make a message appear.

i am not sure how to write the variable coupled with OnRelease function. can u show me how to write the variable? thanks!

well i came up with this, and only the button pressing works :-\

so can someone tell me too why the i++ thing isn’t working?! Heres the code by the way:

[AS]
choice1_btn.onLoad = function() {
i = 0;
trace(i);
if (i>=3) {
trace(“nomorechances”);
}
};
_root.choice1_btn.onRelease = function() {
_root.sorrymsg._visible = true;
i++;
};
_root.choice2_btn.onRelease = function() {
_root.sorrymsg._visible = true;
i++;
};
_root.choice3_btn.onRelease = function() {
_root.sorrymsg._visible = true;
i++;
};
_root.choice4_btn.onRelease = function() {
_root.correctanswer._visible = true;
i++;
};
[/AS]

I’m sure theres a more efficient way then i’ve done it, and i’m sure the i++ things should work, don’t know why it isnt’ though :frowning: