I think in an attempt to simplify and make generic the request, I may have muddled the whole issue. And I could be doing that again… I hope not.
Function A (which contains variables/values to be passed) —> Initiates Timeline —> Timeline Completed & Runs Timeline Action JS script using values passed to it from Function A.
Function A is meant to be generic, which means that depending on where in the application it is called, different parameters are supplied. Thus when the timeline is initiated and completed, the timeline action JS script proceeds according to the data passed to it from whichever function ran the timeline.
For example, I know I can pass data (varA, varB, etc) to be ingested by a function (for example, “genericFunction”) defined in Hype:
hypeDocument.functions().genericFunction(hypeDocument, [element, varA, varB, etc], event);
I would like to do something similar for the timeline action JS script that is kicked off at the completion (or whenever) of the timeline.
As Vic mentioned earlier, this could be dealt with using global variables. However, when targeting mobile, garbage collection matters a great deal and global variables will not be cleaned up. I already have too many of them.