Variable reference not working properly

Dec 27, 2023

Hello-

I am working on a complex drag and drop interaction that was working properly a week ago, but after updating today (I know, my bad...) it is no longer.

In the interaction, I am building a list of the objects dropped, in the order they are dragged. As mentioned, it worked before the update, but now the second item that I drop does not display in the list. It doesn't matter in what order the items are dropped, it's always the second one.

A little more information:

  • The actual interaction spans multiple screens and requires some of the variables and code that might otherwise seem unnecessary. I'm attaching a slightly simpler version that still replicates the issue.
  • I had to use javascript to concactenate the list as it builds. The same script (on the master feedback layer) is used after each item is dropped.
  • I have added some troubleshooting info into the interaction as well as an alert in the javascript, so you can see variables as they change.
  • If you click the continue button and go to the next screen, the reference appears to refresh and the second item appears even though the variable does not change at that point.
  • In the actual multi-slide version, the second third and fourth slides build on the same list. They also use the same script, but it's the first item that is dropped (rather than the second) on those slides that does not appear.

Anyone seen anything similar or have suggestions?

Thanks in advance!

5 Replies
Louise Lindop

Very strange behaviour. I did spend an hour or two on it, but I can also report very odd behaviour with different parts of the varList missing in different places etc. I did notice you were setting the wrong item1Base_Object for dragObject2 (3 instead of 2) see attached, but of course, that has nothing to do with the issue. I would probably give up on the javascript and use 8 different variables to create my list - more work I know! Good luck. Let us know if you work out what was happening.

Math Notermans

Im quickly checking things. 1 remark first. Using Javascript code on Slide- and Feedback masters i only advise to do when all your code is working flawless. Then you can use reusable functions either in a generic_javascript that acts for all slides/pages or on MasterSlides. So first thing im gonna do to test...is removing all the actions from the SlideMaster and triggering them when needed. Further more do Groups in Storyline tend to behave erratically. This is a long standing issue where Groups act as one. Not 100% sure whether thats causing issues, but it for sure might.

David Oskorus

Thanks Louise and Math!

Louise-
Good catch on the dragObject2. I must have made the error in my haste to simplify the example. I agree; using native variables would be ideal. If there was a way to concactenate them I would do so.

Math-
I agree with your first remark. Definitely a best practice. In fact I did work out the basic script at the slide level. The final piece has multiple slides that all use the same functionality, so that is why I ended up with it on the masters. But to your point, it might be worth bringing it back to the individual pages. I will give that a shot.
The groups were just a way of managing the many check objects. Some of the other slides have over 20 drag objects.

The frustrating thing is that before the update it WAS working.

Thank you both for spending time with it!