Forum Discussion
Add/Subtract Checked/Unchecked Button Text Variables from Multiple Slides to Results Slide
Hello Walt:
Thank you for providing the steps. I have to admit, I am an absolute novice and I cannot figure out the purpose for some of the lines in your javascript and fear that it may take a bit to explain them to me.
I did complete a few steps based on your and Richard's previous responses. At this point, I'm not certain if I am placing these triggers on the incorrect slide layers because my javascript is not working.
I have (5) slides that I am trying to compile a list from on the final slide. I am working on just one of the slides to see if I can get this to work.
I've created the following variables to accomplish this task:
- Text Variable: "VariableName" with a Default Value of "Dessert Name"
- Text Variable: "List" No Default Value
- T/F Variable: "VariableName" with a Default Value of False
On Dessert slide, I have (2) layers-- layer 1 contains all of the buttons and text and will execute layer 2, the calculation tab when the user clicks a button on layer 2.
- Each dessert button is set to T/F (default= false) until a user clicks on the button. This button is also tied to another trigger calculating nutritional values of the item-- this part works.
- On layer 2, the calculate layer, I created a trigger for each button following this format: Set "T/FVariableName" to value "True" When the "timeline starts" on "this layer" If the state of "ButtonName" is "Selected".
Then, on the final slide where I want all of the selected items to be listed, I have an "Execute Javascript" for all buttons. The formula is:
var player = GetPlayer();
var List = player.GetVar("List");
var ChocMilkshake_Text = player.GetVar("Chocolate Milkshake");
var Concate = List + Chocolate Milkshake;
player.SetVar("List",Concate);
Then, I inserted a reference %List% in hopes that the selected buttons trigger the text to show up in list format on the final slide.
When I publish, it doesn't work. I'm missing something...
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago