0 Replies Latest reply on Apr 20, 2012 6:21 AM by Ibarim

    drawing mc with canvas on it

    Ibarim Level 1

      Hey,

      I got a problem with displaying canvas on mc, which is drawn on BitmapData object. Code is more or less:

       

       

      var can:Canvas = new Canvas;

      can.setStyle("backgroundColor","blue");

      can.width = 100;

      can.height = 100;

      can.x = 100;

      can.y = 100;

       

      var mc:MovieClip = new MovieClip

      mc.addChile(can);

       

      var bd:BitmapData = new BitmapData;

      bd.draw(mc);

       

      this.beginBitmapFill(bd,new Matrix(),false,false);

      this.graphics.endFill();

       

       

      And I dont see the canvas. ValidateNow() or callLater doesn't help either.

       

      On the other if I add a sprite instead of canvas I can see this sprite on screen.

       

      What should I do and why validateNow() doesn't help in this case?