Send data to PHP without page refreshing

Hello, I have some code used to generate a JPG of a movieclip, which works well but it opens a new window initialize the php script.

I would like it to be so that the php is completed without the page updating or any new windows opening.

My code is as follows:

Code:

_root.onMouseDown=function(){
snap=new flash.display.BitmapData(cam._width, cam._height,true,0);
snap.draw(cam);
pixels=new Array();
w=snap.width;
h=snap.height;
for(a=0;a<=w;a++) {
for(b=0;b<=h;b++) {
tmp=snap.getPixel(a,b).toString(16);
pixels.push(tmp);
}
}
snap.destroy();
output=new LoadVars();
output.img=pixels.toString();
output.height=h;
output.width=w;
output.send(‘capture.php’, ‘output’, ‘POST’);
};
stop();

Thanks for any help