Question on using javascript to change state of objects

Aug 22, 2014

Hi All

This is a tricky one, not sure if it can be done!

I want to create a trigger that can adjust the state of a rectangle - so it changes from normal to hidden.

The rectangle could be one of 5 rectangles, and the rectangle which is to undergo the state change needs to be set from a variable, 'x'.

In other words if x=1, I need the trigger to make rectangle 1 hidden. If x=2, I need the trigger to make rectangle 2 hidden.

Is it possible to change the state of objects using a javascript trigger?

Thanks

1 Reply
Michael Hinze

You can certainly change a variable in JavaScript and pass it back into Storyline (which may then trigger a state change), but I don't know of a way to directly change the state of a Storyline object in JS. From your description it should be simple to hide the rectangles with a few triggers within Storyline. See attached a quick example of one possible option. Hope that helps.

This discussion is closed. You can start a new discussion or contact Articulate Support.