0 Replies Latest reply on Nov 25, 2008 2:13 PM by aranor

    BitmapData.draw() and embedded MovieClip

    aranor
      I can't capture the content of an embedded MovieClip, the following code creates a Bitmap that shows only the results of the changes methods of Graphics, although the clip is correctly embedded. Have you tackled similar problems? Thanks.

      [Embed(source="aMovieClip.swf")]
      private static var AMovieClip:Class;
      //...
      var aMovieClip:MovieClip = new AMovieClip();
      aMovieClip.graphics.lineStyle(6, 0xff0000);
      aMovieClip.graphics.lineTo(100,100); //i don't need this, but this is the only things that you will see, a red line
      var bitmapData:BitmapData = new BitmapData(aMovieClip.width, aMovieClip.height,true, 0xFFFFFF);
      bitmapData.draw(aMovieClip);