0 Replies Latest reply on Oct 16, 2014 4:48 AM by michelvdwiel

    removeEventListener in drag and drop parallax composition

    michelvdwiel Level 1

      Hello all,


      I have a question, one of my students is making a project with a horizontal parallax and he wants to add drag and drop functionality to this. It works, only when you start to drag the object (converted to symbol) shoots to the right out of the screen.


      My guess is that this happens because of the parallax.. So, i want to remove the mousemove function temporarily so the drag and drop works. The code i came up with is this:

      yepnope({nope:['jquery-ui.min.js'], complete: init});

      function init(){


          $("#Stage").removeEventListener('mousemove', onMove, false);



              drop: function (){

                  //addeventlistener here..






      The thing is, it doesn't work..


      In composition ready (stage) is the following code:

      this.onMove=function(posX, posY){

          timelinecontrol = Number(posX)*5;




      In mousemove (stage) is the following code:


      this.onMove(e.pageX, e.pageY);


      I hope that someone can help me.


      With regards, Michel