3 Replies Latest reply on Sep 26, 2006 6:50 PM by kglad

    getting real time mouse status to object.

    disco-logic Level 1
      basically Ive got some code in the MC's layer like:

      onMouseDown = function(){
      mouseisdown = true;
      onMouseUp = function(){
      mouseisdown = false;

      and some code in the MC like:

      //set destination when mouse is held down
      if (_root.mouseisdown = true){
      this.destination_x = _root._xmouse;
      this.destination_y = _root._ymouse;
      //other code

      The idea is to get the MC to follow the mouse only when the mouse is held down. The movent code is more complicated than just what id get from a startDrag so cant use that. Basically I want a way to use the mouse status in real time for movement control and pass that true/false variable down to the logic in the MC so it can make its own decisions.

      At the minute it acts like mouseisdown is always true.

      Am I infact doing it all wrong? I suspect there is a way to access the mouseIsDown/Up info and update it properly from within the MC but I dont know it :/