4 Replies Latest reply on Jun 13, 2014 6:42 AM by edunuzzi

    Using different states of a info button?

    edunuzzi

           Hi, im making a mobile app using Edge Animate and i ran into a problem. There is a info button that remains visible on all pages, but the thing is that i want it to display different content depending on the page the user is at. For example, if he clicks the info button while on page Music, it should create a specific help window for that page.

           I already tried creating a variable that gets changed at every different page and adding an if statement on the info symbol timeline to check the variable's value, so it knows when to play each specific content, but its doesn't seem to work.

       

      here's what i have on my canvas code window:

       

      sym.setVariable("info", 0);

       

      them when the timeline reaches any specific page the variable gets changed:

       

      var infoVar = sym.getVariable("info");

      infoVar = 1;

       

       

      sym.setVariable("info", "infoVar");

       

      The info symbol has a specific timeline, so theres a trigger that checks the variables value:

       

      var infoVar = sym.getVariable("info");

       

       

      if(infoVar == 1) {

        sym.play("Calendar");

      }

      else if(infoVar == 2) {

        sym.play("Music");

      }

      else if(infoVar == 3) {

        sym.play("Calculator");

      }

      else if(infoVar == 4) {

        sym.play("Shop");

      }

      else {

      sym.stop();

       

       

      }

       

      Any suggestions??