Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 93817

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

$
0
0

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


Viewing all articles
Browse latest Browse all 93817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>