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

**URL:** <https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973>\
**Category:** Uncategorized\
**Created:** [April 11, 2003, 4:15pm UTC](https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973 "2003-04-11T16:15:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorena](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jorena](https://forum.kirupa.com/u/jorena)\
**Post date:** [April 11, 2003, 4:15pm UTC](https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973/1 "2003-04-11T16:15:59Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 11, 2003, 4:18pm UTC](https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973/2 "2003-04-11T16:18:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 12, 2003, 3:25am UTC](https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973/3 "2003-04-12T03:25:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 12, 2003, 3:37am UTC](https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973/4 "2003-04-12T03:37:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 12, 2003, 4:08am UTC](https://forum.kirupa.com/t/this-is-my-second-file-problems-trying-to-make-the-message-appear/17973/5 "2003-04-12T04:08:53Z")

</div>

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 ☹
