you can look this sample that is on the flash help.
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
var bitmapData_1:BitmapData = BitmapData.loadBitmap(imagesLinkID);
var bitmapData_2:BitmapData = new BitmapData(100, 80, false, 0x00FF0000);
var mc_1:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc_1.attachBitmap(bitmapData_1, this.getNextHighestDepth());
var mc_2:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc_2.attachBitmap(bitmapData_2, this.getNextHighestDepth());
mc_2._x = 101;
mc_1.onPress = function() {
bitmapData_2.copyPixels(bitmapData_1, new Rectangle(0, 0, 50, 80),
new Point(51, 0));
}
mc_2.onPress = function() {
bitmapData_1.copyPixels(bitmapData_2, new Rectangle(0, 0, 50, 80),
new Point(51, 0));
}
2006/10/19, Johnny Zen <[EMAIL PROTECTED]>:
Hi all
Can anyone give me a super simple example on using copypixels to take
a "snapshot" of a jpg within a movie clip. I'm having trouble
understanding the examples of bitmapdata and copypixels.
It would be a great help for me.
Best wishes
Johnny
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
亲爱的朋友,祝你天天快乐!
http://www.flashpixy.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com