I’m having trouble with buttons that need to be clicked twice. It seems now that even if a button instructs a jump to a new scene AND to a time of 00:00:01 in the timeline, the new scene’s timeline will not play if there is a pause at the start of the scene. I’ve attached a file that show the problem and I’m curious if anyone has noticed thisindex.zip (521.6 KB)
I’ve been using Hype as of v3.5 so do not have a reference with other versions to compare~test this issue.
Clicking on these “Plus” elements does not trigger the alert() initially. Upon first opening the Preview, clicking the “1st Panel Plus” element opens (& closes when clicking the “x”) the panels like it should - but no alert() was triggered. The other two Plus elements register nothing until You click them a second time (as with your code), which only then shows the “alert” dialog. Curiously, if You first click on the “2nd Panel Plus” and/or “3rd Panel Plus” - then click on “1st Panel Plus” it immediately registers alert(), second click not required.
I’ve also tried using “mouseDown” instead of “Click~Tap”; clearing out the code in the Header even though it appeared to have nothing to do with the issue at hand; and tried different browsers.
Keeping the “alert()” functions in place, I then removed the initial “Pause” in the timeline (00:00.00) - basically the same result - two clicks required to display an “alert” dialog.
I then solo’d all scenes (deleting the others), each in turn - “Feature Ad”, “Second Ad”, “Third Ad”.
The “Third Ad” scene (solo) was the only time that the buttons registered a click the first time.
Hopefully You might glean something of value from this info. I’m puzzled & clearly missing something… the variety of set-ups would seem to militate against a straightforward bug.
Check out this document: index.zip (655.6 KB)
hypeDocument.continueTimelineNamed('Main Timeline', hypeDocument.kDirectionForward, false)
… right after the ‘Jump to Scene’ action, which will trigger the timeline on the current scene which has just been entered.
Is that what you’re trying to do?
I do notice that jumping between scenes is a bit awkward because there’s no sense of the current state: Red to Green doesn’t first ‘close’ the red slide-out rectangle. To fix this you would need a reverse action for the current scene’s timeline before jumping to the next state.
You may also find this post helpful which uses behaviours to control timelines on the transition scene.
But @Daniel’s method with JS is what I personally would use…
Thanks for everyone taking the time to help me. Jim, thanks for taking the time to trouble shoot.
Daniel, yes that is what I want to do and I will use your method. I did read the post Mark referenced and found it interesting because there are time that I do want to jump to another scene and to a specific time in the new scene. After reading that, it does seems possible by making the second action on the button a custom behaviour. If I understood it correctly.