How to jump to the specific timeline of a scene from another scene by element On Mouse Click?

Hello,

If there are several timelines in a scene, It is easy to jump to specific time of specific timeline in a scene By using On Mouse Click.

But, is it possible to jump to the specific timeline of a scene from another scene by element On Mouse Click?

Thanks a lot.

Alex

You should be able to construct a Custom behaviour for going to the specific time on scene 1.
On scene 2 mouse click action -> Go to Scene 1 (INSTANT transition) , Trigger Custom Behaviour

In most cases you will want to use instant transition. Otherwise you will get things like the animation will show at the specified time in the timeline but then restart once the scene has fully loaded

You can get around this with some tricks.

For example make the timeline relative. You can then have a crossfade transition that will in effect start the other timeline from the current position rather than jumping back to the start.

customBRel_Fade.hype.zip (25.5 KB)

thanks so much.

I just guess you used Javascript, right? but I can not find the "goToTimeOnScene" javascript in resource.

Any extension used?

Thanks.

Alex

here is the difference between yours and mine:

but I did add a custom behavior on first scene:

Attached, please check my test project file:

timeline test.hype.zip (16.6 KB)

Er.. no I used the Native Hype the Action selections.

It looks like you forgot to add the trigger Custom Behaviour on the scene two button. After the Jump to scene

oh God, yes, thanks so much:)

Alex

Hi everyone.

im new to Hype 3 but love it. At this moment I struggle to get this to work properly, so I have 2 different scenes! When I click an object in scene 1 I want it to start another scene but not from the beginning but a specific time on a specific timeline.

I tried it with a javascript which works when I use full seconds to jump to. I want to jump to a specific frame and don’t know the correct syntax for this.

Right now it looks like this:

hypeDocument.showSceneNamed('scene2', hypeDocument.kSceneTransitionCrossfade, 0);
hypeDocument.goToTimeInTimelineNamed(1, 'test')

hypeDocument.stopTimelineNamed('test', hypeDocument.kDirectionForward, false);

I want to take out the “1” in goToTimeInTimelineNamed and put in e.g. “00:00,29”

Is this possible?

Thanks in advance!
KnoRke

FYI - my programing skills are VERY basic :slight_smile:

Thanks alot for the quick reply!

But I’m not seeing where he puts the time value where scene 1 should begin when pressing the button on scene 2. There is a custom behavior with “goToTimeOnScene” selected but without a specific value?

Am I missing something here?

Nevermind, got it :slight_smile:

Hi everyone,

Its all very nice, I have this one:

 hypeDocument.showSceneNamed('Airbrush', hypeDocument.kSceneTransitionCrossfade, 2);
 hypeDocument.goToTimeInTimelineNamed(3.5, 'Main Timeline')

 hypeDocument.stopTimelineNamed('Main Timeline', hypeDocument.kDirectionForward, false);

The trouble is that it is always getting back to the first frame of the scene “Airbrush” after 2 seconds crossfade. same problem with custom behavior. I tried a few ways as suggested with having a relative time line but, in that case the time line stuck and I can not move it any more.
Any work around will be great, Thanks.

you’ve got to script the goToTimeInTimelineNamed on sceneload of the new scene …

hypeDocument.stopTimelineNamed
Where is this from ???

Thanks for your help h_classen, but I would like to return to this specific frame as I have a menu at the first frames that I don’t need to see the second time I jump into this scene. If I use sceneload it will load there the first time I go in this scene as well.
The only solution I have so far is this:

hypeDocument.showSceneNamed(‘Airbrush’, hypeDocument.kSceneTransitionInstant)
hypeDocument.goToTimeInTimelineNamed( 2, ‘Main Timeline’ )
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward, false)

Which is only working with instant transition, it is going to frame 2 and keep playing which is fine, but as soon as I change to a different transition style, it it will then not work properly, I tried also to do the transition from the action button but with the same result. In fact what I like to have is a different kind of transition, not Instant.

i know of the problem, that’s why stated above. perhaps a persistant symbol could help solving or any other setup. sometimes it’s worth rethinking approaches. Have you seen this one?: Hype Custom Transitions (and Template) may help …

Yes indeed there is a lot to find out and fiddle around with. So I might find a descent solution That I will post here when I find.
Thanks for your link it seem interesting and I will have a closer look at it.

Hi Michel!

I have adapted @MarkHunte’s file from above (“customBRel_Fade.hype.zip”) to what I believe could be a workable solution to your situation.

Hype Demo: customBRel_Fade_v2.hype.zip (25.7 KB)

There are a couple of factors that are key here… one is the use of a relative timeline other than the “Main Timeline”; second using a Custom Behavior (“goToTimeOnScene”).

As I understand your goal:
With a timeline at a particular time in a Scene > do a “fade transition” (or a transition other than “Instant”) and have the timeline in the new scene match the location of the previous scene.

  1. Click the button “Run Timeline TL2”. Timeline runs to a certain point and pauses.
  2. Click the button “Go to Time in Scene 2”. The Scene transition from “Scene 1” to “Scene 2” occurs (fade, 2 secs) and “Scene 2” appears with the timeline in the same location as when we left “Scene 1” - paused; ready to run when triggered (i.e. “Continue Timeline” button clicked).

1 Like

Hi Jim,
Thanks a lot for trying to work it out with me.
What I am trying to do, I have let’s say a few pictures listed, they are books cover, each lead to a scene with details on the book, as I have a few editions, they are listed in different places and keyframes on the scene, that I need scrolling to get to, thats the first scene. Once i am in the next or other scenes, I would like to be able to come back to correct position of the listing, like an anchor point, not at the beginning of the list, which is what is happening at the moment. On top of that I am using parallax to scroll the pages with to fingers (trackpad laptop) this will allow me to scroll back to the same listing position.
It works very well as long as I am using instant transition, but as soon as I try any other type of transition, the scene will jump back to the first keyframe. I can not set on scene load as I will need to go to this first scene before hand.
So I believe that it should be as well posted as feature request, since it is workable with instant transition.
I find a few solutions as when using parallax, I need to leave space on the first keyframes in order to be able scroll, I can use this first space to return to another scene, pointing from a keyframe positioned before the on scene load set keyframe, two fingers scroll back with faking the transition effect give me a similar result.
But we are still missing the transition feature.
Hope you can see what I am looking for now, and maybe you will have a clearer idea on how to work it out.
I’ll keep posting for updates.

Hi Michel!

I’m not following completely and your description in your last post is more complex than your first post - such as the addition of the scrolling.

An example Hype project would be useful here. You do not have to upload the full production - just a couple of scenes which illustrate your issues.

Thanks!

Swipe through scenes to time.hype.zip (92.4 KB)

Hi Jim,

Thats where we are so far.
First transition from scene 1 to 2 is just normal and work fine, I can then return to scene one from scene 2 either by clicking button or swiping up with a pretty similar result.
Then going down the Book Cover page I reach a link to all the pages of this specific book, where I can again swipe up or down, and then go back to my book cover listing in the previous scene at the keyframe I need to reach. Thats where it gets a little more complicated and where I will need to have a smoother transition as I wish to get there without having the first part of the page page visually going down.
Hope that this will be more clear for you now and you can see what I am trying to get to.
All the best…

Thank You Michel - I will look at your attached project in a few hours. :nerd_face: