DEMO: dynamic table / Mimick GoSub() with Lightbox slides
The goal is to separate the visual part of a slide from the logic behind it.
Did you ever had a nice slide which you had to copy over and over again because just a few elements changed. Or you had to build a slide with really complex logic, which the due to the number of trigger becomes complex and hard to read and debug.
It would be nice to call a function, that does some logic and returns the result to the slide. Unfortunately SL doesn’t have a function GoSub() or does it…
The closed we can come to this is by mimicking a GoSub() by using Lightbox slides. When you open them and close them, they return to where they were opened or called from.
Imagine the following, create a light box slide, stuff some logic and set the necessary variable value in the start timeline. As soon as it has finished the ‘start timeline’ the last trigger would be ‘close light box’. This almost works. We need to add an object on the slide and in its start timeline, you close the light box. Why, if we close the light box in the start time line, the full object (slide) is not created yet, leaving some corrupted memory. When adding an object to it, All is already created before the timeline starts on the object which has the close light box slide trigger
I’ve added an example in attachment.
There is 1 results slide, that had 4 buttons. Each button will call a light box slide (you will see a small flickering) and the result table will be filled out.
Each light box slide has some logic in it
When clicking on a value in the result box, it will set the multiplication factor in Box 1…
Hope you get something out of it