How to use JavaScript within Articulate Storyline 360 | Byte Tutorials | E-Learning | Tutorials

preview_player
Показать описание
How to use JavaScript within Articulate Storyline 360? In this video, I’ll explain to you step-by-step how to create a project and use JavaScript to calculate simple interest.

Project Brief:
► Introduction
Let's talk about what is possible using Articulate Storyline and what is not. And then how you can use JavaScript to accomplish it. How you can use JavaScript within Articulate Storyline 360 using triggers to build complex modules that will take a lot of time to build otherwise without JavaScript.

► Creating the example project
I am creating a Simple Interest calculation scenario using JavaScript and Numerical Entry Fields in this example project.

► Understanding Trigger panel
In the Trigger panel, you will see only 1 trigger that you have to create, and the other 4 will be automatically created when creating the Numerical Entry Fields. I renamed the variables associated with Numerical Entry Fields from the Manage Project Variables window or Variable window. Remember, you can only rename the variable and change its default value but won't change the type once created.

► Understanding JavaScript code
First, you need to initialize the GetPlayer() function of Articulate and create a constructor. Next, define three variables using the let keyword; you can use var too.
Now, we need to set the Articulate Storyline variables in the external variables. Here, we assign the value we type in these Numerical Entry Fields, Principal Amount, Rate of Interest, and Year into these external variables.

On the following line, we declare another variable, simpleInterestExternal, and use the simple interest formula, to calculate it. In the last line, I assign the value from the external variable Simple Interest External to the internal variable, which is Simple Interest.

► Publishing the project
Make sure to use the Web or LMS option while publishing the project. If you publish using Review 360, It will not work as expected because the JavaScript preview is not available in Review 360.

___________________________________________________________________________________________________

Chapters:
0:00 Introduction
0:26 Creating the example project
3:03 Understanding Trigger panel
3:58 Understanding JavaScript code
6:25 Publishing the project
6:54 Testing the project
___________________________________________________________________________________________________

🔔 Subscribe for more free E-learning and Storyline tips:

___________________________________________________________________________________________________
Trigger condition:
Action will be - Execute JavaScript
JavaScript - JavaScript
When - When the user clicks
Object - Calculate
___________________________________________________________________________________________________
//JavaScript code:
let player = GetPlayer();
let principalAmountExternal = player.GetVar("principalAmount");
let interestRateExternal = player.GetVar("rateOfInterest");
let yearExternal = player.GetVar("year");
let simpleInterestExternal = (principalAmountExternal * yearExternal * interestRateExternal) / 100;
player.SetVar("simpleInterest", simpleInterestExternal);

___________________________________________________________________________________________________
#ArticulateStoryline360 #AdvancedTriggers #JavaScript #ByteTutorials
Рекомендации по теме
Комментарии
Автор

In this video, I’ll explain to you step-by-step how to create a project and use JavaScript to calculate simple interest. You can use the same concept to build more engaging courses.

vishalmewara
Автор

Second time watching this to learn JS in SL. Please continue this JS in SL series! It is educational.

flagshipbuilds
Автор

are you able to use fetch method for Webhook notification?

jazperwork
Автор

Thank you sir...very informative...I'm trying to be an instructional designer please guide me

estharroja
Автор

Hi
1. How to get serial number of hard disk by Java script in the articulate storyline
And view the serial number in articulate storyline
2. How to create excel file in the desktop in the same computer
And send variable of student from the course of articulate storyline to the excel file in the desktop
3. How to send variable from Google sheet
To course of articulate storyline
4. How to send variable from articulate storyline to google sheet
And thanks

mtnmaiil
Автор

Hi, this is Mamush, I have some trouble with that, Once I published my course it is opened by android mobiles. How can it be possible to open the course by mobile phone, thank you for your attention!

bereka
visit shbcf.ru