copypixels not copying
I am trying to copy an image which is in my library. the problem is .... it is not copied when the image remains in the library. But when i drag the image to the stage then it is copied fine. How can i do it without dragging the image to the stage?
here is the code...
var one:BitmapData = BitmapData.loadBitmap("toon");
var renderBuffer:BitmapData = new BitmapData(225, 325);
renderBuffer.copyPixels(one, new Rectangle(20, 20, 20, 20), new Point(40,40));