Forum Discussion

VicovandenEv121's avatar
VicovandenEv121
Community Member
29 days ago
Solved

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_Daubert's avatar
    Seb_Daubert
    Community Member

    https://community.articulate.com/discussions/discuss/change-state-of-button-from-javascript/873125

    • VicovandenEv121's avatar
      VicovandenEv121
      Community 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

  • It should work if you put the 10 in quotation marks :)

    object('6RWzLNBS5La').state= "10";