I need help making changes to a global variable. I set a variable up on the creationComplete using the code: sym.setVariable("information", 1);
Later in the project I want to call up that variable and then increase the value on a button click. In the button symbol (onClick) I can call up the variable by using: var paragraph = sym.getComposition().getStage().getVariable("information");
When I use an alert(paragraph), the proper value shows up. But, on the click, I need to change the value of the stageComplete variable "information" to 2.
Can anyone give me some guidance on what I'm not doing right?
It seems you want to increment using sym.setVariable() and sym.getVariable().
Thanks joel_pau! I understood what I needed to do in concept, but couldn't get my brain to come up with the syntax. That worked perfectly!