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

Symbol controlling the timeline with mouse scrolling

$
0
0

Hello,

 

After doing a search I found exactly what I need in this thread:

 

https://forums.adobe.com/message/4745511

 

Example - http://dealsdrizzle.com/research/scroll/test1.html

Download - http://dealsdrizzle.com/research/scroll/scroll.zip

 

But I want to replace the "stage timeline" to an "symbol timeline", assuming that my symbol is called "container", how should be the code in compositionReady to get/target my symbol?

 

Vinay Nellagi code:

// Works in firefox
$(window).bind('DOMMouseScroll', function(event) { // to enable scroll for entire window use this
//sym.$("Rectangle2").bind('DOMMouseScroll', function(event) { //to enable scroll for a selected div in firefox            //alert(event.originalEvent.detail);            var dirf = event.originalEvent.detail > 0 ? 'Up' : 'Down';            var velf = Math.abs(event.originalEvent.detail);            $(this).text(dirf + ' at a velocity of ' + velf);            //return false;            if(dirf == 'Up')            sym.play();            else            sym.playReverse();        });


//Works in other browsers
$(window).bind('mousewheel', function(event) { // to enable scroll for entire window use this
//sym.$("Rectangle2").bind('mousewheel', function(event) { //to enable scroll for a selected div in other browsers
            //alert(event.originalEvent.wheelDelta);            var diro = event.originalEvent.wheelDelta > 0 ? 'Up' : 'Down';            var velo = Math.abs(event.originalEvent.wheelDelta);            $(this).text(diro + ' at a velocity of ' + velo);            //return false;            if(diro == 'Up')            sym.play();            else            sym.playReverse();        });

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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