i am trying to control the timeline of a symbol by scrolling the mousewheel.
If i control the main timeline outside of the symbol it works but if i try to control the timeline inside the symbol i do not even get the output of the function.
Had a play with your idea,
You can get the same effect without the motion library by using a group set to be bigger than the scene ( to hide scroll bars with out css code etc) and the scroll element inside the code uses scrollTop
var symbolClock = hypeDocument.getSymbolInstanceById('clock');
var scrollingEl_ = hypeDocument.getElementById('scrollingEl')
scrollingEl_.onscroll = function () {
var scrollAmount = scrollingEl_.scrollTop;
var secondsHand = symbolClock.element().querySelector(".secondsHand");
hypeDocument.setElementProperty(secondsHand, 'rotateZ', (scrollAmount / 1.2))
}
I have a usb-knob that behaves like a scrolling wheel of a common mouse and would like to create that watch-animation that triggers a new animation everytime the hand hits a new hour marker on the timeline. For example: The hand touches a.m 7.00h -> an animation is triggered.
Right now the hand spins superfast and i would like to be able to control the speed (one full rotation of the knob=one hour on the watch.