0 Replies Latest reply on Sep 1, 2006 10:03 AM by FlashAmit

    Advanced AS2 Help

    FlashAmit Level 1
      I was trying to make a simulation of writing effect.
      I hope the solution lies in "Sytem.IME".
      Like we use pen tool of photoshop it simulates the effect of pencil stroke.
      I have been able to make a blur effect using new "BlurFilter" class. Now want to get the pressure sence using wacom. I am sure the wacom is passing some value of pressure to the Operating System which might be cached using "Sytem.IME". Using this we can set the alpha value of stroke.
      Can anyone help me...pls

      import flash.filters.BlurFilter;
      var blurX:Number = 2;
      var blurY:Number = 2;
      var quality:Number = 2;
      var filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
      var filterArray:Array = new Array();
      filterArray.push(filter);
      m.filters = filterArray;
      //=========================
      myLines.filters = filterArray;
      this.createEmptyMovieClip("myLines", this.getNextHighestDepth());
      function drawLine() {
      myLines.lineStyle(6, 0xff0000, 100);
      //myLines.beginFill(0xff0000);
      myLines.moveTo(ix, iy);
      //myLines.lineTo(ix+6, iy+6);
      //myLines.lineTo(ex+6, ey+6);
      myLines.lineTo(ex, ey);
      myLines.filters = filterArray;
      }
      var ix, iy, ex, ey, keepDraw;
      onMouseDown = function () {
      ix = _xmouse;
      iy = _ymouse;
      keepDraw = setInterval(function () {
      ex = _xmouse;
      ey = _ymouse;
      drawLine();
      ix = ex;
      iy = ey;
      }, 10);
      };
      onMouseUp = function () {
      clearInterval(keepDraw);
      };
      // Assign the filters array to the filters property
      // of imageClip in order that the filters will
      // get applied.