Hi Amar,
thank you. The storylinefile would not help, because most of the logic is stored outside the storylinefile.
The JS Code i used in Storyline is:
getHighScore();
This Calls a JS function i stored in a MyFunctions.js here ist the getHighScore Function:
function setVariable(vName,vValue)
{
var player=GetPlayer();
var myVar = player.SetVar(vName,vValue);
return myVar;
}
function getHighScore()
{
$.post('Load.cfm',function (data) {
setVariable("UserNameTop1",data.DATA.USERNAME[0]);
setVariable("UserPointsTop1",data.DATA.POINTS[0]);
setVariable("UserDateTop1",data.DATA.DATECREATED[0]);
setVariable("UserNameTop2",data.DATA.USERNAME[1]);
setVariable("UserPointsTop2",data.DATA.POINTS[1]);
setVariable("UserDateTop2",data.DATA.DATECREATED[1]);
setVariable("UserNameTop3",data.DATA.USERNAME[2]);
setVariable("UserPointsTop3",data.DATA.POINTS[2]);
setVariable("UserDateTop3",data.DATA.DATECREATED[2]);
setVariable("UserNameTop4",data.DATA.USERNAME[3]);
setVariable("UserPointsTop4",data.DATA.POINTS[3]);
setVariable("UserDateTop4",data.DATA.DATECREATED[3]);
setVariable("UserNameTop5",data.DATA.USERNAME[4]);
setVariable("UserPointsTop5",data.DATA.POINTS[4]);
setVariable("UserDateTop5",data.DATA.DATECREATED[4]);});
return myVar;
}
The load.cfm file has some sql inside to get the data out of the database.
I hope that helps :)