5 Replies Latest reply on Apr 21, 2014 11:59 PM by hemanthR

    Conditional Statement to move between labels

    silverstarfyus Level 1

      Hi,

       

      I am trying to create a rollover with boxes that responds to mouseover based on the current label name. (it's sort of a carousel of boxes)

      My label names are 1,2, and 3. I've put stops at the stage level for each label.

       

      What I want it to do:

       

      • Play if you mouseover box 2 if its currently at label 1  (This part is working fine.)
      • Do nothing if you mouseover box 2 if its currently at label 2
      • Reverse if you mouseover box 2 if its currently at label 3

       

      All of these work if they are in the first "if" statement, but combined it causes the fist "if" to play fine, but the following to jump to label one.

       

       

      {

      if (sym.label="1")

      {

      sym.play("1");

       

      }

       

      else if(sym.label="3")

      {

      sym.playReverse("3");

      }

       

      else

      {sym.stop();

      }

       

      }

       

       

      For the life of me, I can't figure it out. Any help would be greatly appreciated!