1 Reply Latest reply on Dec 5, 2012 10:34 AM by TimJaramillo

    Any ideas why this "if" statement is not working?

    267354uytwerjhgw Level 1

      I have this code inside a click command. The first part works, will change variable to 5. But if variable = 5 animation does not play: 

       

       

      if (position != "5"){

                                    sym.setVariable("position", "5");

                                    var position = sym.getVariable("position");

                                              sym.$("Text3").html(""+position);

      }

      else if(position==5)

      sym.play("animation")

       

       

       

      Thanks