Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Help with nested If statements

$
0
0

Hello, I'm trying to get my piece of code working in Edage Animate however I have no idea what's wrong with it.

 

I have two variables in the stage under compositionready which are

op1stat = 0

op2stat = 0

 

I also have two multichoice buttons that set either op1stat/op2stat to a 1 which are working correctly. However I am having difficulty with the nested if statements when equal to 1, whatever string that was previously in "textbot" should be replaced with the string in the code.

 

else if (total==37)

{

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

    sym.getSymbol("multichoice").getSymbol("op1").$("op1text").html("Buy something");

    sym.getSymbol("multichoice").getSymbol("op2").$("op2text").html("Continue");

    if (op1stat==1)

    {

         sym.getSymbol("interfacebot").$("textbot").html("YOU BUY SOMETHING");

    }

     else if (op2stat==1)

    {

         sym.getSymbol("interfacebot").$("textbot").html("YOU CONTINUE");

    }

}


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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