利用storyline的javaScript变量传递接口函数,执javaScrip获取storyline里的变量值。
var player=GetPlayer();//定义实例
player.GetVar("变量名");//获取storyline中的变量
player.SetVar("sl变量名",js变量);设置storyline中变量的值。
案例2:执行JavaScript,获取幻灯片里的变量值:“hello word”。
1.在storyline中添加变量:text,默认值设为:hello word。
2.在storyline中插入一个文本框,并引用变量。
3.添加触发器,执行JavaScript代码。
var p=GetPlayer();var a=p.GetVar("text");alert(a);4.发布,看看执行效果。




