Forum Discussion
MarkSpermon-33e
7 months agoCommunity Member
New Storyline Javascript API
Hi all, In the new Javascript APi You can call the state of an object. I assume you can also change the state of an object. it tried it with code below:
const answerBlong = object('6bfht...
Nedim
7 months agoCommunity Member
You’re not doing anything wrong. Only the Normal built-in state and custom states can be accessed via the object.state property by referencing the state name. Other built-in states (such as Hover, Visited, Selected) are not mapped in slides.js. These states are typically triggered natively by mouse events (like mouseover) or clicks, while custom states are explicitly triggered.
Example of an error when you try to set object.state = "Selected". You’ll encounter the same issue if you attempt to set object.state to "Visited" or "Disabled". However, object.state = "Normal" will work just fine.
The workaround:
object.state = "_default_Selected"