Forum Discussion
KenVenick1
10 years agoCommunity Member
Reset Numeric Entry Box so no value shows
I have a question with Correct/Incorrect/Try again options. Someone on the Forum was kind enough to help out with IF, THEN, ELSE logic for try again. When you get Try Again and return to layer with ...
Snorrski
8 years agoCommunity Member
Hi Laurie
I have a solution for you. On a slide before the one where your numeric entry is situated (could be the start page), you put an "execute javascript" trigger. The code you enter is as follows:
var player = GetPlayer();
//Establish an empty javascript variable
var empty = "";
//Set your Storyline Numeric variables equal to the empty js variable
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_1", empty);
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_2", empty);
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_3", empty);
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_...", empty);
And so on...
This will set the variables to empty, even though storyline can't do it automatically.
You will need to make a "player.SetVar(...."-line for each numeric variable you want to set to empty.
Hope this helps everyone...
- DavidLove8 years agoCommunity Member
This works well. It also works when you just put it onto the same slide and set it to start when the timeline starts :-)