0 Replies Latest reply on May 9, 2007 5:05 PM by minzojian

    unknown border created!!!

    minzojian Level 1
      hello,everyone.
      i got a strange issue.hope some of u have solutions.

      my issue is,i try to copy one bitmapdata's content to a movieclip object,then draw back to that bitmapdata,and repeat to do it.
      however,i saw a border over that movieclip,and it become bolder and bolder.i have no idea about why it happen.it should no such border.
      and this is my code.(AS3.0,compile with FLASH CS3 please)

      import flash.net.URLRequest;
      import flash.events.*;
      import flash.display.*;

      var bitdata:BitmapData;
      var bit:Bitmap;
      var loader:Loader = new Loader();

      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
      var request:URLRequest = new URLRequest("c:\\test.png");
      loader.load(request);

      function completeHandler(event:Event):void {
      bit=Bitmap(loader.content);
      bitdata = BitmapData(bit.bitmapData);
      addEventListener(Event.ENTER_FRAME, onEnterFrame);
      }

      var holder:MovieClip=new MovieClip();
      addChild(holder);

      function onEnterFrame(event:Event) {
      holder.addChild(bit);
      bitdata.draw(holder);
      bit.bitmapData=bitdata;
      }
      and this is AS2.0 version
      import flash.display.BitmapData;
      var bit:BitmapData = BitmapData.loadBitmap("test.png");
      _root.createEmptyMovieClip("holder", 1);
      onEnterFrame = function () {
      holder.attachBitmap(bit, 1);
      bit.draw(holder);
      };
      hope u can help me.thank you.