Forum Discussion
Reset multiple variables to default values
Hi,
I have about 25 variables that I would like to reset with the click of a reset button. All of these items are on a single slide with layers. I added a trigger to the reset button using the javascript above but it is not resetting the variables. Is there another step that I might be missing?
Should this code reset the variables on the slide if the reset button is on the same slide? Does the reset button need to be on a different slide in order for the timeline to reset first?
Does my code look correct or am I missing something?
var player = GetPlayer();
player.SetVar("greenbeans", "False");
player.SetVar("saladmix", "False");
player.SetVar("mixedveggies", "False");
player.SetVar("slicedtomatoes", "False");
player.SetVar("topsirloin", "False");
player.SetVar("yogurt", "False");
player.SetVar("grilledsalmon", "False");
player.SetVar("milk", "False");
player.SetVar("mixedfruit", "False");
player.SetVar("pasta", "False");
player.SetVar("pudding", "False");
player.SetVar("quinoa", "False");
player.SetVar("apple", "False");
player.SetVar("beans", "False");
player.SetVar("slicedapples", "False");
player.SetVar("blueberries", "False");
player.SetVar("bread", "False");
player.SetVar("brownrice", "False");
player.SetVar("cherries", "False");
player.SetVar("cottagecheese", "False");
player.SetVar("greenbeans", "False");
player.SetVar("grilledchicken", "False");
I greatly appreciate any input.
Thanks!
Stacey
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago