16 Replies Latest reply on Oct 15, 2007 7:23 PM by clbeech

    BitmapData Help

      import flash.display.BitmapData;
      import flash.geom.Rectangle;
      import flash.geom.Matrix;
      import flash.geom.ColorTransform;

      myColorTransform = new ColorTransform();
      myMatrix = new Matrix();
      //area=new Rectangle(0,40,50,50);
      myBitmap = new BitmapData(20,20,true,0x00FFFFFF);
      var xRect:Number = 0;
      // animation_mc is 400 x 200. i am just tring to get the first row of blocks
      for(i=0;i<20;i++) {
      var area:Rectangle = new Rectangle(0,xRect,20,20);
      var t:MovieClip = this.createEmptyMovieClip("holder_mc"+i,this.getNextHighestDepth());

      t.attachBitmap(myBitmap, 1);
      t._visible = true;

      t._x = xRect;
      t._y =20;
      xRect += 20;

      ------------------------------------------------------------------------------------------ --------------------
      I have a movieclip "animation_mc" that i want to manipulate by slicing up the movieclip into individual movieclips. I am using the bitmapdata class to do this but when i run this, the "t" movieclip only slices the first square and then repeats itself. I am using the rectangle class to incremently move this slice over but it does not work. Any ideas? Thanks