Hi there I try to control the timeline through a mouse move over an object in my scene.
I have two hype projects embedded on my page.
I use this:
//Max-leftposition of draggable
var max = parseInt(hypeDocument.getElementById('elementID').style.width);
//timeduration of targettimeline
var duration = hypeDocument.durationForTimelineNamed('myTimeline');
$( ".HYPE_scene" ).mousemove(function( event ) {
eventLeft = event.pageY;
containerLeft = hypeDocument.getElementById('elementoID').getBoundingClientRect().left;
relLeft = eventLeft - containerLeft;
destTime = (relLeft/max)*duration;
hypeDocument.goToTimeInTimelineNamed(destTime, 'myTimeline');});
Everything goes fine but only for the first scene because (I suppose) the code "eventLeft = event.pageY;" is about the entire HTML page.
There is a function that refers specifically to the scene and not the page?
Thanks in advance.