thanks mark, i tried removing the trigger scene reset element, only keeping the one that appears over button C, but still after the animation jumps to the start of scene, as soon as A is clicked, it ignores the A && C true if statement and fires the AE cloud timeline anyway
can you think of a way it would be possible for timeline AE cloud to return to its beginning once A OR E are toggled off ?
Your variables on scene load are not being recognised in your other functions because they are not global. So your if/else function cannot establish the variable ButtonA. If you make the variables global then they can use them.
so instead of
var ButtonA = "....
window.ButtonA = "...
Also, Mark makes a compelling argument above. Look into custom behaviours.
@MarkHunte, that makes sense I’m going to set up a simplified version for the template gallery, will prob come in handy for other people working on projects with toggles.
In the file I attached, I wanted the Ae cloud timeline to continue/go to beginning based on what the toggle buttons were doing visually, so I initially tried to control Ae cloud timeline using timeline actions in symbol 1 and 2 to make values false/positive. Is this possible?
then the variable is stored only for that script / function and nothing outside the script / function can access that variable. It’s like a temporary assignment. When you’ve finished the ‘action’ (script / function) the name of the variable is put back in the pool so it is available.
When using the
window.something = "...
then the variable is held by the browser (window) and can be used as and when (also in the console) and will only be released at the end of your session. (well, never as when you open back up it will be stored again )
You can also use the Hype API to start, pause, rewind
hypeDocument.startTimelineNamed('**timeline**', kDirectionReverse / kDirectionForward)
hypeDocument.pauseTimelineNamed('**timeline**') // pause
hypeDocument.goToTimeInTimelineNamed(0, '**timeline**') // rewind to beginning
var currentTime = hypeDocument.currentTimeInTimelineNamed('**timeline**')
hypeDocument.goToTimeInTimelineNamed(currentTime - 2, '**timeline**') // rewinds the timeline 2 seconds
… timelines so perhaps in your code already you can check the state of the toggled buttons and maybe manipulate the timelines accordingly.