Hi all,
I'm using the BitmapData.draw method, and I've bumped into a problem. I
need to copy all the pixels from a movie clip, including the pixels
which are on negative coordinates. I've only succeeded copying the ones
on positive coordinates. Has anyone experienced the same thing, and,
maybe, have a solution?
I got the basic code from Livedocs, written by Andreas Weber (of this
list?) code below. How would I modify it to accept "negative pixels"?
Thamks,
Niclas
---8<---
// 'snapshot'
import flash.display.BitmapData;
// create a clip with visual content
original = this.createEmptyMovieClip("orig", this.getNextHighestDepth());
original.opaqueBackground = 0xFF0000;
original.lineTo(100,100);
// create a BitmapData object with the same size
var myBitmapData:BitmapData = new BitmapData(original._width,
original._height);
// attach the Bitmap to a clip so that it will be rendered on screen
var copy:MovieClip = this.createEmptyMovieClip("cop",
this.getNextHighestDepth());
copy.attachBitmap(myBitmapData, this.getNextHighestDepth());
copy._x = 300;
// take a 'snapshot'
myBitmapData.draw(original);
_______________________________________________
[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