Help with "relative" menu where icons relatively resize and then downsize when others are selected

First time posting. I’ve used Hype for a while. I do NOT know JS, and don’t really want to, but understand the super duper basics of what it is. I’m hoping I do not need to know it for what I’m trying to do here.

In this document, I’m trying to build a persistent symbol as a navigation tool to jump to all the scenes in my document. The persistent symbol is made up of other symbols that represent page icons for each of the scenes in the document.

The easy part is done… the symbol is in place, and it is draggable on the x axis only. I found some JS that achieves that from another post (thank you!!). I don’t understand it, but understand it works, lol.

The document will be ever changing with a varying amount of scenes, maybe 10, sometimes 50, sometimes 100.

So when you select the first thumbnail in the symbol, an animation makes that thumb bigger and takes you to page 1. Selecting thumb 2 will enlarge the second thumb and take you to page 2, and so forth.

Here’s the question and it may require a quick rebuild. I’d rather not use JS at all except where absolutely necessary like the scrolling x only part, way beyond me, but you can tell I was trying to experiment with that here.

If you select page 1, icon 1 grows and you’re taken to page 1. But then say you scroll to the 15th thumbnail and select it. #15 should animate up, and then whatever other thumb is that’s currently selected (in this case thumb 1) needs to reverse animate and go back to it’s normal state. I feel like I’ve seen this solved somewhere on the forum, but can’t currently find the example. Basically when any thumbnail is selected out of however many pages, it needs to check to see if other thumbnails were previously selected and put them back to original while it enlarges.

Eventually, each of these page thumbnails will hold it’s own unique image, so they will all look differently. I figured that’s why it needs to be built this way?

Do I need to build my persistent symbol differently and maybe use custom behaviors? Again, I’d like to do it using native Hype’s capabilities so I get what’s happening.

I could just have each page icon enlarge and then go back so you know it’s selected, but it’s just not as cool. I have a working version of that, but rather would do it where each icon stays enlarged until another is selected.

I’ve only worked up to the first 2 icons and then became frustrated. Would love some input.

relative_menu.hype.zip (111.1 KB)

cause your setup is almost the same and the question (in theory) too … this should also fit for your needs:
Buttons playing timeline animations

The none-scripted version of challenges like these is to run behaviours (may be collected in a custom behaviour) to reverse all other buttons timelines of the except the pressed one

I can see you were heading in the right directions but tripped up a little on your setup.

You had the right idea of looking at custom behaviours.

But here is the concept of how it needs to be set up to work in what I think you are after.

Each Page symbol’s timeline that controls the enlarge and colour change should be named exactly the same. Not individually as you have them.

i.e

Page 001 ->Thumb001timeline
Page 002 -> Thumb002timeline

should be

Page 001 -> Thumb_timeline_n
Page 002 -> Thumb_timeline_n.

So each page symbol will run the same named timeline.

As shown here for Page 001

30


Each Page Symbol should have a custom behaviour that does the same thing and is named the same.

As shown here ThumbReset inside Page 001 Symbol

42

In Each Page Symbol at the top of your Mouse Actions for the group , we now add a call for the custom behaviour .


As you will see Custom behaviours are indiscriminate and broadcast to anyone whom is listening on/with the same name.

So any symbols which have a custom behaviour with that name will try and run it.
Since all we are then saying is do something to a timeline named Thumb_timeline_n which they all have, they all will reset.

relative_menu_MH.hype.zip (115.5 KB)

3 Likes

Thanks so much. This has let me move forward immensely to do what I want. I would still like to have the thumbnails animate back down to size, instead of jump but I’ll get to that in the future. Also, I’ve seen some other example where you can use the physics engine to push the other thumbnails as the enlarging one grows, then push them together when it goes back down. That will be fun to learn as well. But again, thanks, this does work! I didn’t realize custom behaviors could be broadcast to like that. Sweet.

1 Like