Forum Discussion

RicardoArango's avatar
RicardoArango
Community Member
3 years ago

Simulating a spread sheet in story Line 360 using Java Script

Hello Heroes,

I´m trying to do a course with a simulated spread sheet in it, but I can't get it to work. Do you guys have any idea? Heres´s my code:

//get the Player
var player = GetPLayer();

//get all the text entries 
var canonPactado = player.GetVariable("canonPactado");
var doceCanones = player.GetVariable("doceCanones");
var kilometrosAno = player.GetVariable("kilometrosAno");
var excesoKilometraje = player.GetVariable("excesoKilometraje");

//do calculations
var total = canonPactado+doceCanones+kilometrosAno+excesoKilometraje;

// display the text
var totalText = player.GetSlideObject("valorKilometro");
totalText.Text = total;