1 Reply Latest reply on Jun 13, 2014 1:34 AM by Sudeshnasarkar27

    How can I make a button appear only after 5 other items were clicked?

    Sefralicious11

      Hello, I'm a Student. Doing my final Project. I'm creating an Interactive story. So what I need is that, the user need to click certain items first before they can go to the next chapter. But I don't know how to make the next button appear after the items were click.

      Thanks a lot. Appreciate the help.

        • 1. Re: How can I make a button appear only after 5 other items were clicked?
          Sudeshnasarkar27 Adobe Employee

          Hi ,

           

          You can set a variable say "count" on stage composition ready -

          sym.setVariable("count" , 0);

          On stage click , you keep checking the value of this variable -

          if(sym.getVariable("count") == 5)

          {

            sym.$("Symbol_2").show();

          //Here "Symbol_2" is the next button that you want to appear on screen(which is initially invisible) when the symbol_1 is clicked say 5 times.

          }

          Now, on click of a button , you keep updating the variable count -

          var countnew = sym.getVariable("count");

          countnew = countnew+1;

          sym.setVariable("count" , countnew);

           

          Attaching the sample for reference.

           

          Thanks and Regards,

          Sudeshna Sarkar

          1 person found this helpful