3 Replies Latest reply on May 3, 2013 1:36 PM by resdesign

    Deleting and Creating symbol instances


      Hello Edge Animate community!


      I have run into a problem that I have spent a long time trying to figure out but with no avail. So my hope is that someone reading this will be able to help me out


      I'll start off by saying that my knowledge of webcode is not the best, but I am learning as I go.


      I am working on a project that uses "if then" statments. For example



      if (test = 0) {// Code }

      else { / /Other code }


      Now the "if then" statment works fine however my problem is the code that I am able to put into one of the two options seems limited. I'm not sure if I have it set up wrong or what, but I need to be able to delete and create instances of symbols/elements depending on the variable "test".


      So for example if "test" equals 0 I want to delete symbol "update" so my code is...



      if (test = 0) {sym.getSymbol("update").deleteSymbol();}

      else {}


      However this code doesn't work??? If I just use




      then the code works fine. But when I put it in the if than statment it fails to excute??? I can put other code in the if than statment, such as alert(test); and I get the proper alerts ect.... So I don't believe it is the statment itself. But I could be wrong.


      Has anyone else had this problem? I would really appreciate any advise. Thank you so much!