Forum Discussion
ZsoltOlah
10 years agoSuper Hero
Changing state directly from JavaScript?
Hello Heroes!
Maybe someone out there can help me out! I've been playing with JavaScript and Storyline, you can see an example here: http://bit.ly/1IjNEKs.
But, what I can't figure out is how t...
MathNotermans-9
5 years agoCommunity Member
Actually in SL360 its now quite easy to access any object onscreen by using the 'accessibility' names. You either can set the name on an element and target that... or go for the default names Storyline uses.
Code for accessing any page-element in SL360 would be something like this...
var femaleImg = $("[data-acc-text='female@3x.png']");
gsap.to(femaleImg, {duration:2,x:"-=25"});
This code selects an image with jQuery on my SL-slide which has a filename of female@3x.png and moves that then with Greensocks gsap Tweenmax 3.
At the moment working on some approaches on getting things done in SL with Javascript. Will show more of that later on...