Tuesday, April 26, 2011

Consultation

I am done with saving the image in the server by using the code of
$filename = "images/mtf_". mktime(). ".jpg";
the filename is a variable
images is the folder where the pictures will be save
mtf is the starting of file name
mktime is the time stamp use to name the file
.jpg is the file format

but the problem is how to make it fully functional in my Flash application. I managed to get the image freeze when user click on capture button. But i got the problem on how to unfreeze it when user want to retake their photo. With the help of Mr. Hafiz, i managed to unfreeze the image using this code :
public function captureImage(e:MouseEvent):void {
//snd.play();
captureon = !captureon;
if (!captureon) {
addChild(bitmap);
} else {
removeChild(bitmap);
}
bitmapData.draw(webcam);
then, when users are happy with their image and click continue, their image will be save in my server and they will continue to the next stage.

No comments: