Text Scrolling Triggered By Separate Element

(Karl) #1

Is it possible to click and hold on an element, say a down arrow graphic, and have that action cause text in a separate text box to scroll down. Seems like it should be quite simple but I can’t figure out how to do it.


(Jonathan Deutsch) #2

The solution requires javascript. The way you would do it is:

  1. Set a unique element ID for the element that has content overflow to scroll
  2. Add a On Mouse Down action to a button that runs javascript to start a timer (setInterval) that will increase the .scrollTop value of the element every 17ms. Make sure to save this interval timer as a variable.
  3. Add a On Mouse Up action to a button that runs javascript which stops the timer (clearInterval).

Sample project here:
ScrollButton.hype.zip (49.5 KB)

(Karl) #3

Thank you for the prompt reply. Now let’s see how I get on with that.

(Karl) #4

Worked perfectly. Thank you so much!

(Jonathan Deutsch) #5

Great, glad to hear that!

(Karl) #6

Here’s the site, made entirely in Hype. Love this program!


(Jonathan Deutsch) #7

My mouth is salivating, and not just at the buttery smooth animations! :wink:

(Karl) #8


Kitchen Sisters is my girlfriend’s catering company and everything you see on the site she cooked, so I pretty much get to eat like that all the time. I should be the size of a house, but somehow I’m not.

(Hans-Gerd Claßen) #9


(Mark Hunte) #10

Yum. very nice and the site…:grinning:

(Karl) #11

I’m just about to tuck in to one of those burgers! :grinning:

(Freelancer) #12

Nice, however the site is not responsive, have you planned an upgrade?

(Karl) #13

Yes, that’s my next task, to make it ‘responsive’. Just really needed to get something up first as she’s getting a lot of ‘word of mouth’ so there are abundant opportunities to tell people to go look at the site. Plus, I’ve got a ton of other work on at the moment so had to do what I could in the time available. But, yes, now I need to get it mobile. Not really looking forward to all that faff, but it has to be done.