How to Create Random Numbers in Articulate Storyline 3 using JavaScript

preview_player
Показать описание

Articulate Storyline Training video:
In this video we will show you how to create random numbers in Articulate Storyline 3.

Let’s jump into the topic.
First, create a layer. In this layer, we need to insert one numeric entry field. Click on the insert. Then, click on input and insert a numeric entry field. Next, create a submit button.
Next, we need to modify numeric entry box variable. Click on X sign which is located on the right side. Then, Click on Numeric entry variable and name it as MinValue.
Next, duplicate this layer and name it as Max value. Also, we have to modify numeric entry box variable. Click on X sign and name the variable as MaxValue.
Then, we need to create two variables. Click on the + sign and create a text variable and name it as RandSet. Create another number variable and name it as RandomValue.
Then, create a text box in the base layer. In the text box insert RandomValue variable using reference.
Now go to the Max value layer and create action as shown. Execute JavaScript when user clicks, submit button. In the script box, paste the code which is given in our description or add the code as shown on screen. Next, create another trigger to hide this layer when user clicks submit, button.
Then, go to the Min value layer and create a trigger to show the Max value layer when user clicks, submit button.
Then, in the base layer create the following triggers. Show Min value layer when timeline stats. Execute the JavaScript when the user clicks “Click me” button. In the script box, add the code as shown.
Execute the JavaScript when the user clicks “Reset me” button. In the script box, add the code as shown.
Set the MinValue variable equal to zero when the user clicks ‘Reset me’ button. Set the MaxValue variable equal to zero when the user clicks ‘Reset me’ button. Set the RandomValue variable equal to zero when the user clicks ‘Reset me’ button.
Finally, create a trigger to jump to this slide when the user clicks “Reset me”.
Now publish the course for further process. Here I am given the minimum value is 1. And maximum value is 10. So, here will see random numbers between the 1 to 10 when clicking click me button.
We have to reset the randomization by clicking reset me button.
Subscribe to our, YouTube channel for more videos. Thank you for watching this video.
Рекомендации по теме
Комментарии
Автор

Much better explanation with this video.

dougarnold
Автор

I need your help, I want to set the range of A and B variable and articulate automatically select any two numbers of variable A and B, then user writes the answer in the numeric entry box and clicks on the add/subtract button, which checks the answer either it is right or not.

usrasaeed
join shbcf.ru