Hey folks,
i found this nice tilt-effect.
I want to load this event on mouseOver and unload and reset this on mouseOut.
So, i'm struggling to figure that out, as you might have already assumed, because you are reading this
So, this is my naiv approach:
//Max-leftposition of draggable
var max = parseInt(hypeDocument.getElementById('containerLeft').style.width);
//timeduration of targettimeline
var duration = hypeDocument.durationForTimelineNamed('test');
$( ".HYPE_scene" ).mousemove("mousemove", function( event ) {
eventLeft = event.pageX;
containerLeft = hypeDocument.getElementById('containerLeft').getBoundingClientRect().left;
relLeft = eventLeft - containerLeft;
destTime = (relLeft/max)*duration;
midTime = duration/2;
hypeDocument.goToTimeInTimelineNamed(destTime, 'test');
});
$( ".HYPE_scene" ).mouseout("mouseout" , function stop(e) {
midTime = duration/2;
hypeDocument.goToTimeInTimelineNamed(midTime, 'test');
hypeDocument.pauseTimelineNamed('test');
});
mousemove.zip (116,6 KB)
Thank you guys in advance!