|
-
Bitmapdata of several MC
Hi,
I'd like to make a Bitmapdata object with more than one movieclip, in the way these MC are overlaped at my movie. By now I'm only able to do this with just one MC. I'm working with Flash Player 9 and Actionscript 2.0.
Any idea?
Last edited by rachelangelo; 08-03-2009 at 01:56 PM.
-
post your actual code?
gparis
-
Code
Sure, this is the code I got from another thread. Function named "render" is called by a button, while "renderer.php" is the one that does de "dirty job" with PHP + GD libraries.
Code:
function render() {
//HERE IS WHERE I'D LIKE TO ADD MC2 AND MC3 TO mypic
mypic = new BitmapData(mc1._width, mc1._height);
//ALSO I DON'T KNOW HOW TO CUT THE RECTANGLE TO 200x300 PX
// I SUPOSE HERE
mypic.draw(mc1);
var w:Number = mypic.width;
var h:Number = mypic.height;
var pix:Array = new Array();
for (var a = 0; a<=w; a++) {
for (var b = 0; b<=h; b++) {
var tmp = mypic.getPixel(a, b).toString(16);
pix.push(tmp);
}
}
var output:LoadVars = new LoadVars();
output.img = pix.toString();
output.height = h;
output.width = w;
output.send("renderer.php", "output", "POST");
}
I have to say this is actually working BUT obviously for just one movieclip rendering.
Thanks a lot!
Last edited by rachelangelo; 08-03-2009 at 03:54 PM.
Reason: extra information added
-
did you try that:
mypic = new BitmapData(mc1._width, mc1._height);
mypic2 = new BitmapData(mc2._width, mc2._height);
eventually using a for loop to generate an array of mc could help shorten the process.
gparis
-
Yes, the problem is I don't know how could I merge these to movieclips considering their location at the domument, as they are draggable.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|