Problem: Activating the “next” button only when the users have completed a questionnaire set.
I have tried to create a miniature version of this problem
Created a list showing 3 items
The user can ONLY move to the next screen by clicking on the “next” button if the user has at least once clicked item 1. Actually later, I want to add items 2 and 3 to this list. So, I need to program it in such a way so that the “next” button is available to move to the next screen, after the user has clicked on all the items on the list.
The way I have done it, is I have created a variable called “click_1” and initialized to “false”.
click_1 = false;
On pressing item 1, this variable gets initialized to true.
on (press) {
click_1 = true;
}
And on the “next” button, I have the code:
on (press) {
if (click_1=true) {
gotoAndPlay(“scene2”, 1);
}
}
BUt somehow, all this is not working. The “next” button is available/active even when the user does not click on item no.1
thank you i appreciate your help so much.
I did notice that, for comparision purposes, I had forgotton to write:if (click_1 == true)
However this did not work. also I tried using _global.click == true
So far as the second solution, I would have multiple items, and the user can activate the “next button” only after they have clicked on the multiple items. Hence this way of solution. BUt then, my way could be wrong.
Thanks again, it is all so useful.
Hi Claudio
this time I just deleted the “_global” component part, and it worked fine. I think this is what was messing it up.
i have it set up as
"on (press) {
if (click_1==true ){
gotoAndPlay(“Scene 2”, 1);
And, everything is flowing very smoothly. Now I will move on to the next stage. Thanks again, so much