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 to access an object directly from JavaScript. I would like to change the state of a graphic from JavaScript.

In the example above, if you launch the course with adding ?test=Confused at the end of the URL link, and go to Chapter 3, the character will show the confused state. But essentially, I'm changing a variable first, which leads to a trigger to change the state. If I want ten different states, that's ten more manual triggers. 

What I'd like to do is change the character's state directly. Any thoughts?

10 Replies