i tried to built a page with 4 buttons. Each button is a symbol that contains 2 png´2 which are the the button Designs. If you click on button 1 it should move on the screen. If you click it again it should moves back. and if you click on another button while button1 is active then button1 should move back to starting position and button 2 should move on screen.
i use a switch statement and a variable.
on composition ready i used
to set the Variable
on each button(one of the png inside the symbols) i used:
var current = sym.getComposition.getStage.getVariable("current");
case "" :
case button1 :
ad each animation of the buttons are labels for the in and out animation. There are also triggers that change the variable current on the stage
if i test it inside of a browser and click on one of the button nothing happens.
i´m not sure what´s my mistake.
can anyone help me?
Some syntax errors in red:
var current = sym.getComposition().getStage().getVariable("current");
case "" :
case "button1" :
Thank you very much! you made my monday:)
now it works. got some problems with the symbols. If the composition is played for the first time then some of the symbols are already played. But i solved it trough a statement in CompositionReady:
Have a nice day!