XML Webcam Capture
Hi everyone. Im trying to capture the (raw)data output of my webcam to feed into a socket and hopefully replay in another swf.
My first step is trying to capture the raw data. My attempts have been unsuccessful. I have tried:
Code: trace(camera.get()); trace(camera.get(1)); obviously looped to get continuous data however this echoes [object Object] How can I view the raw data or is this not possible? is there another way to do what im trying to do? or is it impossible?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 11-21-2006, 10:29 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Capture Webcam Pictures
Hello,
I am having this crazy idea of a new kind of videoconferencing in flash without using flash communication server. It basically captures videos, saves it on the webserver and the other party loads this file.
This way you see pictures at certain intervals of the other party.
It's not livestream but it should do the job.
I have figured all this out already (I think), the only problem is to capture a certain picture of the webcam. I should be able to send this data to a webpage (loadvariables()) and save it on the webserver.
I've searched for tutorials on the internet but I can't seem to find it, maybe I'm usng the wrong search parameters.
Can anyone help me on this?
Thank you very much for reading.
greetings,
avalon
[F8] Help: WebCam Capture A Snapshot
I'm very newbie in action script. I would like to take a snapshot from the local webcam and has a preview of a captured bitmap on the stage, after that.
a) save as a local jpg.
b) directly upload it to a php server.
but after tried searching over the net i found a lot of examples but none of them works for me. At this time i can only show webcam on the stage. Could someone help me what did i do wrong? Thanks in advance.
Code:
import flash.display.BitmapData
import flash.geom.Matrix
/* capture the video stream from the active webcam and display it inside the video object */
my_cam= Camera.get();
my_video.attachVideo (my_cam);
my_video.smoothing=1
// create a new bitmap object
var snapshot=new BitmapData(320,240,true,0x00FFFFFF);
//a function that takes a snapshot of the Video object after push 'SHOOT' button
function takeSnapshot()
{
snapshot.draw(my_video,new Matrix());
this.createEmptyMovieClip("my_video",this.getNextHighestDepth());
my_video.attachBitmap(snapshot, this.getNextHighestDepth(), "auto", true);
}
How To Capture Webcam Snapshot?
I have followed Lee's tutorials on saving snapshot from webcam, but now I found out that I need it to be in a normal swf file rather than an air application. How could I change the code here?
Code:
import com.adobe.images.PNGEncoder;
import flash.filesystem.*;
var cam:Camera = Camera.getCamera();
var video:Video = new Video(240,180);
cam.setQuality(0, 100);
video.attachCamera(cam);
//video.x = -52.5;
frame.addChild(video);
btn.addEventListener(MouseEvent.CLICK,saveImage);
var count:int = 0;
//how to start from last number;
var scale:Number = .45;
var m:Matrix = new Matrix();
m.scale(scale,scale);
function saveImage(e:MouseEvent):void {
var bmd:BitmapData = new BitmapData(60,80,false);
bmd.draw(video,m);
var ba:ByteArray = PNGEncoder.encode(bmd);
var file:File = File.desktopDirectory.resolvePath("card" + count++ +".png" );
var fileStream:FileStream = new FileStream();
fileStream.open(file,FileMode.WRITE);
fileStream.writeBytes(ba);
fileStream.close();
}
I wanted to save the snapshot to a folder where my swf is.
Currently the code save the picture from 0 every time i open the swf. How can I save the filename after the last image in that folder?
[F8] Help: Use WebCam To Capture A Snapshot
I'm very newbie in action script. I would like to take a snapshot from the local webcam and has a preview of a captured bitmap on the stage, after that.
a) save as a local jpg.
b) directly upload it to a php server.
but after tried searching over the net i found a lot of examples but none of them works for me. At this time i can only show webcam on the stage. Could someone help me what did i do wrong? Thanks in advance.
Code:
import flash.display.BitmapData
import flash.geom.Matrix
/* capture the video stream from the active webcam and display it inside the video object */
my_cam= Camera.get();
my_video.attachVideo (my_cam);
my_video.smoothing=1
// create a new bitmap object
var snapshot=new BitmapData(320,240,true,0x00FFFFFF);
//a function that takes a snapshot of the Video object after push 'SHOOT' button
function takeSnapshot()
{
snapshot.draw(my_video,new Matrix());
this.createEmptyMovieClip("my_video",this.getNextHighestDepth());
my_video.attachBitmap(snapshot, this.getNextHighestDepth(), "auto", true);
}
How To Capture Webcam Snapshot?
I have followed Lee's tutorials on saving snapshot from webcam, but now I found out that I need it to be in a normal swf file rather than an air application. How could I change the code here?
Code:
import com.adobe.images.PNGEncoder;
import flash.filesystem.*;
var cam:Camera = Camera.getCamera();
var video:Video = new Video(240,180);
cam.setQuality(0, 100);
video.attachCamera(cam);
//video.x = -52.5;
frame.addChild(video);
btn.addEventListener(MouseEvent.CLICK,saveImage);
var count:int = 0;
//how to start from last number;
var scale:Number = .45;
var m:Matrix = new Matrix();
m.scale(scale,scale);
function saveImage(e:MouseEvent):void {
var bmd:BitmapData = new BitmapData(60,80,false);
bmd.draw(video,m);
var ba:ByteArray = PNGEncoder.encode(bmd);
var file:File = File.desktopDirectory.resolvePath("card" + count++ +".png" );
var fileStream:FileStream = new FileStream();
fileStream.open(file,FileMode.WRITE);
fileStream.writeBytes(ba);
fileStream.close();
}
I wanted to save the snapshot to a folder where my swf is.
Currently the code save the picture from 0 every time i open the swf. How can I save the filename after the last image in that folder?
Capture Video From Webcam Using Fms
Hi I'm trying to capture video from web cam to the server,
I got the video from webcam, and capture as a jpeg using php, But my requirement is capture video file,
So I googled and find the FMS concept, Its very new to me. I'm not a guru in server side scripting, So I cant understand the basic concepts of fms,
So please any one help me to know how its works, & how can i create a application,
Note: I installed flash media server to my localserver, But I cant run rtmp://localhost ist right?...
No one here to help me, So please turn me to a right path, If sample file is appreciated.
I fully trust this forum,
Thanks in advance,
Bitmapdata Capture A Webcam
hey i'm trying to capture frames from a webcam and put them in a blank paper.
ok let me explain i made webcam bitmapdata that pixalte the video to make a rectangels out of it. so my question is how can i "capture" the created shape (from the rectangels) scale them down and place them on the stage one after anthor like text.
i hope i was clear. i realy need help badly so PLEASE.
thanks
Capture An Image With User's Webcam
Hi:
Is there any way to capture an image from a webcam of the user?
The objetive is capture an image like JPG, GIF, etc and store or send to a server.
I don't really know if it's posible or if I have to use any other software
Thanks in advance
Capture Webcam (quick Question)
summary: all I need to know is how to pause the video from a webcam to produce a non-moving image. read on for details.
howdy folks.
heres a quicky, buts its REALLY important to know, so any way i can solve this problem would be GREAT...
ok, so I have a webcam displaying inside a flash animation. thats easy, heres how I done it for arguemnts sake :
[SCRIPT]
//I made a new Video object via the libary, instance name is "myCameraDisplay"
localCamera = camera.get();
myCameraDisplay.attachVideo(localCamera);
[/SCRIPT]
now that works all spiffy. but how can I pause the webcam image so it just becomes a still portrait. the end result is 4 photos of the user in various poses, that prints all on the same page.
thanks!
Flash Based Still Webcam Capture?
I am currently running a dating site, which I think would be nice if it had an easy way to upload an image to your profile.
The way I'd like it to work is you would load the flash up, click "Take Photo", the image would then be able to be previewed before upload. Then the user would click upload to server, where the file would be uploaded, either through flash, or I am also using coldfusion. Is this possible using flash? If so is there a turorial or fla file out there anywhere showing how to create such an app?
Thanks
James
Capture Image From Webcam And Displaying It.
I am working on a project that involves capturing a pic of the user after a countdown from a webcam and then displaying it with an overlay.
I have read through this , but haven't been able to fully figure it out.
I am able to display the live video from the webcam fine through Flash, but how do I capture the image and then redisplay it?
Basically, I know I need to somehow store the image to a movie clip, then simply recall it, but I am fairly new to action script and Flash and am not sure how to lay it all out in Flash.
I know this is fairly broad, but any help would be appreciated.
[F8] Help With Webcam Image Capture And Save
Hello, I was just wondering if anyone could give me some help with figuring out the code needed for capturing single images from a webcam via keypress whilst in a flash animation, and saving them to a separate folder? Any help would be greatly appreciated, thank you!
Webcam -> BitmapData Capture Creating A Ton Of Whitespace :(
I'm trying to capture a frame from webcam video every few seconds. However, when I get the capture via snapshot.draw( ... ), there is a TON of empty whitespace bitmap data. I tried creating a clipping rectangle but it only affects the desired part of the captured image (ie: real data, not blank whitespace)
Code:
video.attachVideo(Camera.get());
import flash.display.BitmapData
import flash.geom.*
var snapshot:BitmapData=new BitmapData(video._width, video._height);
bitmap_mc = this.createEmptyMovieClip("bitmap_mc",this.getNextHighestDepth());
function takeSnapshot()
{
//draw the current state of the Video object into
//the bitmap object with no transformations applied
snapshot.draw(video,new Matrix(), new ColorTransform(), new Object());
//display the specified bitmap object inside the movie clip
bitmap_mc.attachBitmap(snapshot,1);
trace("Bitmap_mc: " + bitmap_mc._width + "x" + bitmap_mc._height);
trace("Snapshot: " + snapshot.width + "x" + snapshot.height);
}
var interval = setInterval(takeSnapshot, 3000);
Both snapshot and bitmap data report to have 400x300 size, which is the full size of my canvas and that of the "video" Video instance.
Help?
---------------------
If i Add bitmap_mc._xscale/yscale = 50 and take a screen shot, it looks like this. Live video is in the back and the snapshot is in the top left. See all the reatarded whitespace?
http://mso.homelinux.com/temp/as1.jpg <--------------- CHECK OUT THE SCREEN SHOT
thanks.
BitmapData.draw Fails To Capture Webcam
I am trying take a snapshot from a webcam. I'm using BitmapData.draw(video). This works fine on my desktop but when I try to do it in the browser it fails. Apparently this is some kind of security restriction. Is there a way to get around it?
Webcam - Image Capture - Save On Server
hello ppl,
i did a small app in wich u can save an image from ur webcam and store it on our server, kind of a webcam guestbook or so....
if u wanna give it a try - here it is - http://liveshot.nook.ch
How To Make A Screensaver (flash?) With Live Webcam Capture?
sony, acer all have their new notebook with Built-In camera.
and they all use screensaver to demo their webcam functions.
it looks like a flash screensaver with live capture window of the camera.
(the webcam capture "live" of the people looking at the camera)
is that a function of flash 8 or it is just a screensaver making software with webcam live capture function?
example; sony VAIO FJ series......
Capture Webcam Snapshot As Bitmap And Send To Server
I have a local webcam stream appearing on the stage in a movieclip.
When I click a "snapshot button", a still image from the webcam gets attached to a new movieclip on the stage with attachbitmap and then draw()
The snapshot shows up in the movieclip on the stage as a preview.
I want to know how to send the data of this bitmap in the movieclip to a server (php or coldfusion) to be saved as a JPEG.
I can't figure out how to access the bmp data and send it to a server... any answers?
Live Screen Capture? Webcam Snapshot (bitmap API)
Hey all,
Got round to the point where screen grabbing an image and saving it to file is too much, so what i want to do now, is take a snapshot of a live webcam image (I have webcam display working) and display the snapshot/screen grab, next to it or anywhere in the movie. This way the screen capture can be stored temporarily in the movie. once the movie is closed, all info is lost. Once another screen grab is taken, then the previous one is overwritten. The idea is simple but having problems working out how to do it in AS3!
I have got to the idea that i may need to use the Bitmap API to copy a section of the movie, and then redraw it into a new bitmap object? Please can anyone give me a hand! much appreciated!
Key Capture
hi all,
i'm trying to achieve a key caputre technique in flash using AS. here's what i want to do. i want to be able to display a login box whenever a user presses Ctrl + Enter. so i wrote the following actionscript. don't mind the first two, just put it on this post so if they cause any problem, someone would tell me. i have a mc with the visible property set to false, so i want to display it when they do the key-combination, and if the box is already being displayed to hide the box. but when i do this, the movie actually jumps to another scene.
here's the code:
loadMovie("navigation.swf", "navigation");
stop();
if (Key.isDown(Key.CONTROL) && Key.isDown(Key.ENTER)) {
if (login._visible==false) {
login._visible=true;
}
else {
login._visible=false;
}
}
any help is appriciated, thanks
Capture SWF
Is there a way to capture the old map on this page
http://www.nsk.hr/HeritageDetails.aspx?id=228
in maximum size ?
I only get this,
www.nsk.hr/Flash/nsk_bastina-karte.swf
No old map ?
Cam Capture
Afternoon!
Can anyone tell me how to do or point me in the right direction of some resource that will allow my flash movie to capture a users webcam without showing the prompt box?
By prompt box I mean that box that appears when a flash movie requires access to the microphone or camera?
All I want to do is detect and connect with the users webcam if there is one without asking them. The camera will only be seen by the user themself as opposed to anyone else - in a 'local' environment
Anyone know how to do this? I'm using flash CS3.
Thanks in anticipation!
Capture Everything
is it possible to capture the event or things users have clicked using FCS? sharedobject? you know like Breeze?
thank you
Capture Url
How do you capture the url of the page you are on into action script.I'm trying to load a different swf for every link into a container swf.
Capture Cam
How i can capture my video cam and save the sceenshot as jpg?
Thank you?
Name Capture
is there a way in flash to have a user type in there name and the movie keeps it and refers to that person though out the rest of the elearning?
How Can I Capture A Swf?
the question is
how can i capture a swf while it is playing
so i can import it into premerie or even into flash again?
the swf is interactive and i want to record it
and trasform it later as a quicktime or windows
media player file for a dvd use.
Capture Image On A Swf
I have created a drawing palette, now when the end user draws there picture I want them to beable to email it as an ecard.
any ideas
thanks
Screen Capture
I would like to know if flash provides any facility to capture the screen and embed it into a fash movie.
If any additinal tools are required I would like to know those as well.
Any help will be appreciated.
ScreenShot Capture
Does anyone know of a way
of setting up a function in
a flash movie to capture the
screen and send as an email
as an attachment or as a link
to an email account??????
is it software or actionscript??
Lard
Audio Capture
A client would like to place a voiceover into a flash presentation I created for him. What is the easiest/cheapest way of doing this?
Is there a freeware or inexpensive audio capture software program I can use for this? (he's on pc)
thanx for your help!
Capture Ctrl-c
Is it possible to capture the keystroke "control-c" ? I know how to code capture keystrokes however this one doesn't seem to work. Here's my code:
keyListener = new Object();
keyListener.onKeyDown = function() {
if(Key.isDown(Key.getAscii() ==(0)) && Key.isDown(Key.getAscii()==(99))){
trace ("cut captured");
}
}
Key.addListener(keyListener);
or alternatively:
keyListener = new Object();
keyListener.onKeyDown = function() {
if(Key.isDown(Key.CONTROL) && Key.isDown(Key.getAscii() ==(99))){
trace ("cut captured");
}
}
Key.addListener(keyListener);
Any clues?
thanks
Capture Video
does anyone know how to capture video & save it in bmp or jpg.
i have movie 'dat' file, my friend send me that video. now i want to capture some photo/snap from that movie.
i m playing that movie using media player 7. but when i try to capture screen using 'print screen' it dosent work. i dont know why.
if u have any solution or any software which u know pls let me know.
thanks
Screen Capture
I have produced a small paint game, is there anyway of prining it from a button in the swf, or even better screen grabbing the drawing and saving it on to the desktop, ( similar to the "apple+shift+4" comand on a mac)
thanks in advance...
Camera Capture
hey there.
flash can have an embedded video display a picture from a webcam.
is there any chance i can pause the image? to give a photo taking effect.
thanks!
PS - Is it possible to save the taken images as a jpg? or even print the images afterwoods?
thewaste
Capture Screen
Hey does anyone know how to capture the screen on a mac...
I know its not a flash thing but I need the image for flash...
Capture Signature
I would like to dynamically draw my signature into flash and then email it out...
anybody have a clue on how to do the latter...emailing it out once the flash .swf file is maninpulated and changed?
many thanks again!
~fit
Screen Capture
Is it possible to some how do a screen capture when a user clicks a button, and an image is produced from it? Kinda like hitting print screen...
Email Capture Box ?
iv made a site for a band. they want people to join there news letter list by typing there email into an input text box and then pressing "send" button.
Send button will send that email adress to the bands email adress.
this is action script iv written:
on (release) {
getURL("mailto:bandsname@yahoo.com?subject=Chance& body=Email = "+email+")'}'
im getting 4 error messages. please can you help me by correcting this! Thankyou
wexfordman
(using Flash MX 2004)
How Do I Capture Emails?
I am designing a banner ad, and at the end I want to create a text box to have visitors enter their email address and then click submit.
When they click submit, I want an email sent to both the visitor's email address and mine to let me know they entered the info.
How can I do this, or is there a file or tutorial somewhere that can help me?
I am assuming it would be like a php form (I think, right?)
Any help would be greatly appreciated.
How Do I Capture Ctrl + Another Key?
I want to be able to capture Ctrl + another key.
How do I do this?
I've got the following code from help:
var keyListener:Object = new Object();
keyListener.onKeyDown = function()
{
trace("DOWN -> Code: "+Key.getCode()+" ACSII: "+Key.getAscii()+" Key: "+chr(Key.getAscii()));
};
Key.addListener(keyListener);
But I can't seem to be able to capture key combinations like Ctrl + another key.
For what I need to do, I really need to capture several key combinations.
At the very least, I want to be able to capture Ctrl + another key.
Any help would be appreciated.
Thanks.
OM
How Do I Capture The Page Down Key?
Can someone tell me how I can capture the Page Down key?
I've seen the example int he Flash help...
But that doesn't seem to work?
I do a simple trace to capture the key pressed and for the Page Down and Up keys.
Nothing gets registered.
Thanks.
OM
Screen Capture
hi there,
bit of an strange one here but not sure if it can work, then again, man got to the moon after all!
anyway.
I'm working on a time based project now using a Mac and flash 8. All i want to do is display the users (mine) clock on the centre of the stage.
I would like it as a live screen shot, with live updates, with magnification, and yes, i'll be expecting pixelation.
Does anyone know the code for this at all?
I've attached a static jpg of roughly what i would like it too look like.
Thanks in advance!
tabrez
Data Capture
Hi,
I have a PowerPoint presentation that I am adding both swf and avi animations to. The intent is to turn this presentation into a web-based learning module with quizzes.
I imagine that it is possible to program Flash to capture scores, registration info and other user input and report it back, but how difficult is it? I am relatively new to Action scripting, and don't know if that is the best solution. Are there any third-party programs or services that would be better than me trying to maintain it all in Flash? We are looking at WebEx for hosting, but it sounds like they have to just record the whole presentation straight through (with quizzes at the end) and we would like the flexibility of sending a user back to a certain frame if they missed a question for review.
Any thoughts? TIA for your help!
Video Capture
Hi everybody,
I wonder if you can help me with this:
I´m making an installation (not for the web) where the viewer sees an animation and every 1-3 minutes the animation is interrupted for 1-4 seconds and the viewer sees himself- filmed by a camera that is placed above him.
I looked on the board but I can´t figure out what exactly I need for this and how to combine the video capture with the main running animation.
is this difficult to do?
Thank you!
Laura
Capture Right Click?
I would like to capture the event of a user "right clicking" and also disable the menu in turn. is this possible? I'm pretty sure I've seen it done on miniclip before.
it's for a starcraft type of game and i need (well it would be nice) both butons on the mouse.
Screen Capture?
Hey everyone.
I was wondering if there was anyway to do a "Print Screen" type command within flash which would then allow someone to manipulate the users screen. For example, having an animated character jump on the IE scrollbar and drag it down with him on it...kinda dumb example I guess. But I really want to be able to take a screen shot and import it somehow into Flash (fullscreen). Does any of this make sence? I know Ive heard of Flash caturing TOOLS...but it there any actionscript or components around. This doesnt seem to be a hard task when you think of it. Hit me back. Any suggestions are cool.
Capture Web Cam Image
This has been asked before and I haven't found the solution yet.
I have the following code for a web cam and it works great...
Code:
myCam = Camera.get();
myVideo.attachVideo (myCam);
myVideo.smoothing=3;
myCam.setQuality(16384,100);
myCam.setMotionLevel(20, 500);
myCam.setMode(1024,768);
Now, all I need is when a button is clicked, it takes the current image on the web cam and saves it, or converts it to a bitmap so I can save it.
This is NOT working:
Code:
on (click){
// create a new bitmap object
var snapshot=new BitmapData(320,240,true,0x00FFFFFF);
snapshot.draw(my_video,new Matrix());
this.createEmptyMovieClip("my_video",this.getNextHighestDepth());
my_video.attachBitmap(snapshot, this.getNextHighestDepth(), "auto", true);
}
Suggestions?
Thanks,
Zath
F-Key Capture In ActionScript
Is it possible to capture the pressing of certain F-Keys in a swf. that is being viewed in Internet Explorer.
I am making a simulation of an application in Flash and the application uses the F-Keys frequently. I know that certain F-Keys are reserved for IE but is there a way to override that or a way around it?
Thanks
|