0 Replies Latest reply on Nov 24, 2014 6:59 AM by solesolejj

    How to synchronize the timeline with the iPad accelerometer

    solesolejj

      Hi,

      I'm trying to synchronize the timeline of my edge animation with the iPad accelerometer.

      I would like something like this:

       

      var animationHeight = 4096;

      var stageHeight = sym.$("Stage").height();

      var scrollPos = sym.$("Stage").scrollTop();

      var duration = sym.getDuration();

      var percent = scrollPos / (animationHeight - stageHeight);

      var time = duration * percent;

       

       

      // Update timeline

      sym.stop(time);

       

       

      but using the accelerometer instead of the scroll.

       

      Thanks