7 Replies Latest reply on May 7, 2006 6:54 PM by kglad

    event listener

    james_solo
      "free" is the instant name of the movieclip that behaves as a free drawing tool in MS paint .
      i've try putting "Mouse.addListener(_root.mouseListener);" inside or outside the free.onPress function & adding "_root." to the listener obj , it always compile successfully , but it won't draw anything !!!
      the following is the orginal one from actionscript.org : (i try to rewrite it with addlistener)

      createEmptyMovieClip("Line",1);
      Line.lineStyle(1,0x000000,100);
      onMouseDown = function ()
      {
      Line.moveTo(_xmouse, _ymouse);
      onMouseMove = function ()
      { Line.lineTo(_xmouse, _ymouse);}
      }

      onMouseUp=function()
      {
      onMouseMove=null;
      }