Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Hammer.js drag along Edge Animate timeline

$
0
0

Pulling from two sources, this one by Andy Triceand this one from the Hammer.js Docs, I'm trying to implement a carousel in Edge Animate but as you drag and swipe left, the carousel follows the timeline and contents in the slide are animated.

 

 

If I didn't need to animate the contents of the slides, this would be no problem but whats becoming an issue is trying to connect the dragging action to control the position of the play head.

 

 

As of now, I have this basic function plays the composition based on a swipe.

 

 

    function init (){

 

        var element = sym.element[0];

        var hammer = Hammer(element);

 

        hammer.on("swipeleft", function(event) {

              sym.play();

        });

 

        hammer.on("swiperight", function(event) {

              sym.playReverse();

        });

    }

 

 

On my timeline there are a few stops set at the beginning of each slide so compostion just slides. But how would I have it set so that once you drag, the playhead will advance. But after a certain threshold, the it snaps and plays.

 

Any ideas or help is appreciated.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>