Forum Discussion
VicovandenEv121
29 days agoCommunity Member
Change state by new JS API
How can I change the state of an object using the Storyline Advanced JS API?
Tried putting this in a Execute Javascript Trigger:
object('6RWzLNBS5La').state= 10;
(10 is the name of the state)
https://www.articulatesupport.com/article/Storyline-360-Advanced-JavaScript-API
It should work if you put the 10 in quotation marks :)
object('6RWzLNBS5La').state= "10";
4 Replies
- Seb_DaubertCommunity Member
https://community.articulate.com/discussions/discuss/change-state-of-button-from-javascript/873125
- VicovandenEv121Community Member
Thanks for sharing!
Should be easier according the article from Articulate about the Advanced JS API, but can't get that to work yet :(
https://www.articulatesupport.com/article/Storyline-360-Advanced-JavaScript-API
- CharlotteHaslerCommunity Member
It should work if you put the 10 in quotation marks :)
object('6RWzLNBS5La').state= "10";
- VicovandenEv121Community Member
yep, quotation marks do the trick, thanks.