1 Reply Latest reply on May 5, 2006 4:34 AM by Rothrock

    onmousedown

    Abyu Level 1

      Hi
      can anybody help me
      iam working in flash 8
      i have movie clip with instance name "ball" and a dynamic text box named "_root.count"
      the scirpt is when i click on the ball the number of mouseclicks should be displayed
      i used this code on the movieclip
      onClipEvent (load){
      _root.count = trace("count:"+count);
      var count=0;
      this.ball.onMouseDown=function(){
      count++;
      trace("count:"+count);
      }
      }
      but it does not work it counts even when i click on the screenarea
      i need only to count the clicks on the ball

      i thank you if can help me
      please
        • 1. Re: onmousedown
          Rothrock Level 5
          That is because it is what you are telling it to do. onMouseDown means exactly what it says, "When the mouse button is pushed down." It is an event triggered by the mouse, there is nothing about clicking a specific movieclip.

          I think what you really want is onPress or onRelease, these are the events that can be assigned to specific clips, like "ball".