1 Reply Latest reply on Sep 6, 2006 10:27 AM by kglad

    pixel dissolve

    jagguy99 Level 1
      I can't make the pixels dissolve so the object reduces to nothing.

      import flash.display.BitmapData;
      import flash.geom.Rectangle;
      import flash.geom.Point;


      var bmp1:BitmapData = BitmapData.loadBitmap("cave1");
      var bmp2:BitmapData = new BitmapData(64,64);
      var bmp3:BitmapData = new BitmapData(64,64);
      var bmp4:BitmapData = new BitmapData(64,64);

      this.createEmptyMovieClip("mc1", this.getNextHighestDepth());
      mc1.createEmptyMovieClip("mc11", mc1.getNextHighestDepth());
      mc1.mc11.attachBitmap(bmp1, mc1.mc11.getNextHighestDepth());
      mc1.mc11._x=100;
      mc1.mc11._y=0;




      this.createEmptyMovieClip("mc3", this.getNextHighestDepth());
      mc3.createEmptyMovieClip("mc33", mc3.getNextHighestDepth());
      //bmp2.copyPixels(bmp1,new Rectangle(0,0,bmp1.width,bmp1.height),new Point(0,0));
      bmp3.pixelDissolve(bmp1,new Rectangle(0,0,bmp1.width,bmp1.height),
      new Point(0,0),0,0);

      mc3.mc33.attachBitmap(bmp3, mc3.mc33.getNextHighestDepth());
      mc3.mc33._x=0;
      mc3.mc33._y=100;

      var num:Number=0;

      mcbt2.onPress=function()
      {
      bmp3.pixelDissolve(bmp1,new Rectangle(0,0,bmp1.width,bmp1.height),
      new Point(0,0),0,num);
      mc3.mc33.attachBitmap(bmp3, mc3.mc33.getNextHighestDepth());
      _root.num+=500;
      }

      mcbt3.onPress=function()
      {
      bmp3.pixelDissolve(bmp1,new Rectangle(0,0,bmp1.width,bmp1.height),
      new Point(0,0),0,0);
      mc3.mc33.attachBitmap(bmp4, mc3.mc33.getNextHighestDepth());
      bmp3.pixelDissolve(bmp1,new Rectangle(0,0,bmp1.width,bmp1.height),
      new Point(0,0),0,num);
      mc3.mc33.attachBitmap(bmp3, mc3.mc33.getNextHighestDepth());
      _root.num-=100;

      }