Problem:
I’m having issues with my current JavaScript (Still new to the idea of scripts with ActivePresenter.) I’m attempting to have an object change states when a button is clicked.
I’ve assigned a variable to increase by 1 every time the button is clicked, and then simultaneously run the following script:
//When button is pressed, the variable change is increased by 1
//The following variables represent the three cases
var casA = prez.variable(‘Change’) == 1;
var casB = prez.variable(‘Change’) == 2;
var casC = prez.variable(‘Change’) == 3;
//represents the object square
var square = prez.object(“Square”)
//this section is supposed to change the state of the object, but doesn’t work when running the presentation.
if (casA)
{
prez.object("Square").state(State2)
}
else if (casB)
{
prez.object("Square").state(State3)
}
else if (casC)
{
prez.object("Square").state(State4)
}
I’d love to hear any input, thank you
ActivePresenter version: 8
OS: Wubdiws
Notes: