Forum Discussion
EmilyGann
8 months agoCommunity Member
JavaScript works but doesn't appear in Storyline
Hi. I'm trying to get an array of months to quickly appear one at a time on a Storyline slide. I've tested the JavaScript separately and know it works. However, the problem seems to lie in getting it...
Nathan_Hilliard
8 months agoCommunity Member
Without an example project, I'm not sure what you are doing exactly. I haven't used the JS API functions much however, I can suggest:
- line 32 looks like an error
- I don't believe textContext exists as a property or method on Object()
- The Object() function really just exposes the topmost wrapper of a slide object. This allows you to do things like move, scale, rotate, change state, etc. but it does not give you direct access to the actual HTML element or things like the contents of say a text box.
- If your goal is to assign a series of text strings to a text box on the slide, consider just using a SL variable reference (%variableName%) in the text box and setting that variable via JavaScript or a slide timer.
- Since displayArray() doesn't return anything, I don't know what line 33 is storing