Problem to draw a clip with a clip a cliparea
Hello,
I have a clip, and I want to redraw only an area of that clip.
Therefore I use the following code where I use a simple rectangle with "hello" written inside it, its dimension are 200*100
I want to redraw only a part of 50*20 of that rectangle. Here is the code I used :
var clip:MovieClip=new MovieClip();
clip.graphics.beginFill(0x990000,1);
clip.graphics.drawRect(0,0,200,100);
clip.graphics.endFill();
var texte:TextField=new TextField();
texte.text="hello";
texte.x=50;
texte.y=50;
clip.addChild(texte);
this.addChild(clip);
var bmpData:BitmapData=new BitmapData(50,20);
var rect:Rectangle=new Rectangle(60,50,50,20);
bmpData.draw(clip,null,null,null,rect,false);
var bmp:Bitmap=new Bitmap(bmpData);
this.addChild(bmp);
bmp.y=150;
clip.visible=false;
Nothing shows up when I run the application, I expected to see to see a red rectangle 50*20 showing a portion of "hello" , but I didn't get it.
Can anybody tell me why?
Thanks in advance,
Pascal