Horizontal Slider Challenges

I am playing around with Spritesheets and added a button, made character clickable and added a horizontal slider. However, I am struggling with getting the horizontal slider to move smoothly and aligned with the cursor and need the circular ball to not accelerate toward either end of the slider line if you release the ball while when moving left or right.

PigFlipTest.hype.zip (2.4 MB)

Any help much appreciated.


Tweak the slider until your mouse and the knob line up:

A 100% speed means that drag movement of 100 pixels will move 1 second on the timeline.

Your element starts at 126px and ends at 426px, so it moves 300 pixels in a duration of 1 second 22/30 frames (1.7333s).

300 / 1.7333s = 173.08 pixels per second

100 / 173.08 = 57.777, which means 58% is the value to use.

(trial and error to find this is sometimes faster than doing the math!)

Got it! Thank you Max & Jonathan. I also wanted to mention that the Spritesheet feature works very well with exported animations in the form of sequenced png images from a program called Cartoon Animator 4. Very impressed with Hype yet again on how its unique features enable other creative opportunities. PM

1 Like

Great - glad that is a good workflow for you!