Forum Discussion

Matt_Kurtin's avatar
Matt_Kurtin
Community Member
11 days ago

No Luck Using New JavaScript Functionality in Storyline to Update Object State

Using Execute JavaScript with following code:

const radButton = object('6r0NAZwt4OW');

radButton.state = "R5";

Aware of issues with built-in states other than "Normal" and avoiding use those.

Can see in console that state value has changed from _default to R5, but the graphical state of the object is not changing to show the elements in state R5.

Has anyone else encountered this issue and resolved it?

2 Replies

  • Matt_Kurtin's avatar
    Matt_Kurtin
    Community Member

    After testing I found that the code above works if I do not have an image in any of the states. When I add any image in any of the states (even ones I am not trying to set the state to), the code above stops working.

  • Matt_Kurtin's avatar
    Matt_Kurtin
    Community Member

    Also found stops working if have more than one shape in any of the states. Seems odd to have this many restrictions on how it could be used