ActionScript 3.0 :: Displaying/saving Webcam Snapshot In Correct Size?

Jul 13, 2010

Im sitting here with a project that i feel i have come a long way with (found some very usefull rescources). But i am stuck now and need some guideance in short terms what i am doing is a project where users can take a snapshot of them selves by using their webcams, and then save this picture.

This is all going ok, but when i save the picture its not the same size as the webcam picture. From what i can tell there is something going wrong with the bitmap creation process, and i cant seem to figure out how to add a field that i can toss the picture into like i have done with the video. (its using addchild(bitmap) now and that just adds a small picture at a given x & y, but i cant control size of it. And the saved pictures im getting are the size of the video area, but only 1/8th is filled with the picture, rest is just white..

[Code]...

View 3 Replies


Similar Posts:


Php :: Saving A Picture In Flash Webcam Snapshot Application?

May 5, 2011

I have made a flash webcam application to allow the user to take a photo of themselves using a webcam. I have successfully saved the photo in my localhost. However, I would like to set the names of those photos. Currently, the photos names are generated by

$uniqueStamp = date('U');

I also have a textfield in my flash app that allows inputs from user for the photo name. For example if the user write 'MYPHOTONAME' in the textfield, the photo which will be saved in my localhost will be named 'MYPHOTONAME' too. How do I do it in Flash and in PHP? Currently I'm having some problems because I cannot send the textfield string to PHP.

Here is my flash code to send the snapshot to PHP and let the PHP save it in my localhost:

imgBA = jpgEncoder.encode(imgBD1);
sendReq.data = imgBA;
sendLoader.load(sendReq);

[Code]....

As you can see, I tried to pass in $photo = $_POST['photo']; from flash to PHP however I do not know the exact code, can anyone help me?

View 1 Replies

ActionScript 3.0 :: Get My Webcam To Take A Snapshot Using It?

Nov 16, 2008

Currently working on a school project that requires me to use AS3 to display a webcam, and create a button that will take a snapshot and place it beside the video display.[code]...

View 2 Replies

Flex :: How To Take Webcam Snapshot Picture

Jul 11, 2010

Using Flex, what is the recommended way of taking a webcam snapshot picture? Something along the lines of:
var camera:Camera = Camera.getCamera();
var image:Image = /* magic goes here */

View 2 Replies

Actionscript 3 :: Flash Webcam Snapshot Reduce Motion Blur?

Feb 8, 2011

i have a photo snapping app built in flash. I notice that any movement results in a lot of motion blur.. which makes the photos kind of turd. Is there a way to digital reduce the blur? potential camera setting in actionscript??

View 2 Replies

ActionScript 3.0 :: Live Screen Capture Webcam Snapshot (bitmap API)?

Apr 10, 2008

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?

View 9 Replies

Flash :: Upload Snapshot From Webcam Directly To Twitpic, Flickr, Facebook?

Jan 4, 2011

I succeed to get a snapshot from the webcam as a jpeg (via BitmapArray) and now I want to upload it directly to twitpic or flickr

View 1 Replies

ActionScript 3.0 :: Stage Snapshot With Webcam View And Image Is Not Working If The .swf Is Moved

May 25, 2011

Stage snapshot with webcam view and image is not working if the .swf is moved

private function initTracking() : void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP;
var camW : int = 640;
var camH : int = 500;
[Code]...

View 0 Replies

ActionScript 3.0 :: Saving A Webcam Still To JPG Via PHP?

Dec 11, 2008

I am capturing a webcam still and saving in a BitmapData variable. I want to then pass the BitmapData to a php script where I can save it to a folder.

View 2 Replies

ActionScript 3.0 :: Saving A Webcam Video Stream?

Mar 24, 2010

I'm pretty new to flash.how to add a webcam, but is there a way to save a video from the webcam feed onto the pc running the flash app?

View 3 Replies

Actionscript 3 :: Saving Webcam Image To A Website?

Jan 19, 2011

How can i save a webcam screenshot to a website?

I know you can save it to your hard drive using:

var browseFileReference = new FileReference();
browseFileReference.save(video);

But how would i go about it to save this image to a website, lets say flickr or facebook or something.

View 3 Replies

ActionScript 3.0 :: Saving Webcam Picture As JPG File?

Oct 8, 2010

I have a swf that lets you take a picture with your webcam , I have changed the scaleX to -1 so that the picture on screen appears like a mirror. This works fine, when I take a screenshot I am getting a bitmapdata from the video stream, which I am also setting scaleX to -1 to preserve the image the same as from the video. But now I am trying to save that picture as a jpg file, I can't seem to save the pictures as it appears, I can only save it as the original data which is essentially the wrong way around (doesn't preserve the changes made to scaleX = -1)

Code:
bitmapData = new BitmapData(this.video.width,this.video.height);
bitmapData.draw(this.video);
// at this point the bitmapData is the webcam view, but not with the scaleX I applied before
[...]
var jpgStream:ByteArray = jpgEncoder.encode(bitmapData);
// so now this jpg data is of the picture which isn't horizontally flipped
How can I get a bitmapData from the video and preserve the scaling I applied to the video?

View 3 Replies

ActionScript 3.0 :: Capturing And Saving Screenshot From Webcam Feed

Jan 4, 2012

I'm new to AS3 and attempting to learn it by doing a small task, I am trying to get a live local video feed from USB webcam and want to be able to capture and save screenshots from it.I have the live feed working fine, but I am struggling to capture and save a screenshot.Someone from adobe forums suggested I should use BitmapData and JPGEncoder, which I have alongside as3corelib's.[code]I think I am doing something wrong when I am capturing the binary data, or when I am encoding it to JPG.Some assistance from somebody familiar with these methods will be a huge help as I am stuck now, and I am not getting any replies from adobe forums.Both the resolution of the videoInstance object and camera feed are 640x480, and the video is displayed fine.

View 7 Replies

ActionScript 3.0 :: Snapshot Of A Movieclip And Add The Snapshot To The Stage On Every Frame?

Nov 8, 2009

I want to take a snapshot of a movieclip and add the snapshot to the stage on every frame.

Does anyone know how to do this?

I'm trying to achieve a reflection effect...

View 3 Replies

ActionScript 2.0 :: LoadVariablesNum - Displaying Correct Data

Jul 8, 2004

I'm making a game and I need to load variables into my flash movie from a database. I'm using asp and I know it works fine because it outputs what I want. My problem is that when I try to load the data into flash, it won't let me use the variables. If I put a dynamic textfield on the stage with fname (one of my variables), the text field displays the correct data, but when I say trace (fname) with having the text field, "undefined" pops up.

View 5 Replies

ActionScript 2.0 :: Displaying X And Z Axes (Coordinates Looks Not Correct)?

Mar 14, 2005

i'm having a problem with the displaying of the x & z axes coordinates. it seems that when i am in postive x & z the always have negitive coordinates displaying. it seem that the whole x n z axes have a wrong coordinates. is there any way to solve the problem to the following code? or are there ways easier to rewrite the code?

Code:
onClipEvent (load) {
// position of origin
origin_x = 300;
origin_y = 200;

[code]....

View 1 Replies

ActionScript 2.0 :: Displaying X & Z Axes (Coordinates Looks Not Correct)?

Mar 14, 2005

i'm having a problem with the displaying of the x & z axes coordinates. it seems that when i am in postive x & z the always have negitive coordinates displaying. it seem that the whole x n z axes have a wrong coordinates. is there any way to solve the problem to the following code? or are there ways easier to rewrite the code?

Code:
onClipEvent (load) {
// position of origin
origin_x = 300;
origin_y = 200;

[code]....

View 1 Replies

Media Server :: FMS 4 - FLV Not Saving - Record Video From The Users Webcam And Play It Back At A Later Date

Mar 24, 2011

I'm trying to record video from the users webcam and play it back at a later date.
I call

[Code]...
 
However, when I look at the FMS Admin Console at the streams in app/_definst_, their types are either "NetStream" or "Live". If they were being saved wouldn't they say "Stored"? After I close the application doing the recording, the "NetStream" type stream disappears, and after a while all the "Live" typed streams are gone too. Nothing is saved.

I have no idea what is happening. I don't know if it's a problem with my AS3 code not closing the recording properly or if I'm doing something else wrong, or maybe somethgin isn't right in the FMS?

View 1 Replies

ActionScript 2.0 :: Displaying Movie Clips In The Correct Order?

Jan 11, 2009

I'm having issues displaying movie clips in the correct order. I'm pulling in data from an xml file, in this case images and then create movie clips to hold them. I'm getting the right order from the actual Array when looping through the xml file but when I create the clips the order gets all screwed up. how to order the clips exactly the way they are in the array?

#########loop that creates the clip########
for(var b = 0; b<story_arr.length; b++){
if(story_arr[b].nodeName != "title"){

[Code]....

View 0 Replies

ActionScript 3.0 :: Displaying An Error After Saving Data To An External File?

Feb 13, 2012

displaying an error after saving data to an external file:

var variables:URLVariables;
var fLoader:URLLoader;
var fData:URLRequest;

[Code]....

Where can I post a message to display if the file has been saved or not?

View 3 Replies

Image Won't Import At Correct Size

Apr 6, 2009

I have a background image at 720x576px. My flash document is also set to the same. When I import my graphic and drag it onto the stage it is a completely different size?

This means I have to re-size using the free transform tool, and as I have to re-size many images for different movies that have to be exact, what is the best way to re-size them? Should my imported image not fit the stage size exactly without re-sizing at all?

View 9 Replies

Resize - Size For Webcam In Flash?

Jul 15, 2011

I've just an SWF object to display the users webcam, however it won't let me make the webcam smaller than 320 x 240. Is this the lowest size I can go?

Just for any reference if needed:

import flash.media.Camera;
import flash.media.Video;
var camera:Camera = Camera.getCamera();

[Code].....

View 1 Replies

ActionScript 3.0 :: Crop Stage To Correct Size

Jan 3, 2011

I have a movieclip that i want to move when i push the left and right keys, which i have working however it when i embed this swf file into a web page the movieclip object will not stay within the stage size i set, in other words the longer i hold left the further along the web page it moves. Does anyone know a way other than [SWF(width="500", height="500", frameRate="30", backgroundColor="#FFFFFF")]

I also tried cropping the moving movieclip which did not help it just moved the smaller movieclip all over the screen in the same way.

I already set if conditions to stop the movieclip going out of bounds but it only seems to work within adobe flash player

View 1 Replies

ActionScript 3.0 :: External Loaded SWF Size Not Correct

Mar 25, 2011

I am loading an external swf, but when the swf is loaded, its height is correct, but it's width is not. Why is this?

"Block9.swf" is a simple MovieClip with a width of 100 and a height of 120.

But when the swf is loaded, its width output is 169. But the height is correct at 120.

Code:
var swfLoader:Loader = new Loader();
addChild(swfLoader);
var swfRequest:URLRequest = new URLRequest("Block9.swf");

[Code]....

View 1 Replies

ActionScript 3.0 :: Get Window Size And Call Correct Photo?

Dec 8, 2009

I envision a series of photo gallery sites with certain elements that do not scale (thumbnails) and certain elements that do (the big pictures). Hopefully these big pictures will scale to be as big as possible within the available space in the browser window, but I don't want them floating over. I would like to know if the flash swf can "measure" the size of the browser window, then call the server to have the correct size JPEGs sent to flash to be displayed. That way I'm not getting a 2000 pixel JPEG for someone with a 1024x768 browser window. Dynamic scaling of bitmaps seems possible as of flash 8, but I would like to be able to measure windows to load a JPEG closer to the correct size for 2 reasons:

1. It seems like maybe it would load faster if I'm only sending the correct size JPEG to the browser, and not something significantly larger

2. It seems like once JPEGs have been scaled to less than 50% of their size in Flash, they tend to exhibit anti-aliasing artifacts that are undesirable.

It won't be me doing the programming, but I like to have some sense of what the possibilities are and I try to speak at least a little of the language of the programmers.

View 2 Replies

ActionScript 3.0 :: Movie Clips To The Correct Stage Size

Jan 8, 2012

if for example I'm creating a scene with falling snowflakes. In the movieclip is there a way of correctly knowing which area of the main scene you're working in? Or is it just a case of creating the movie, then returning to your scene and placing in where it's appropriate?

View 3 Replies

Actionscript 3 :: Webcam Captured Image Resolution / Size

Mar 9, 2012

I have been having a bit of trouble with AS3 and webcams. I have a script that connects to a webcam and then sends its output to a php script that saves the captured image. This works all except for one problem. It seems that the maximum resolution allowed for the actual Camera object is 320x240. I went to the extreme of hooking a Canon 60D up as a webcam because I have a normal webcam that is supposed to have max resolution of 1280x720 and all I can get is a 320x240 image from it. What I have found so far is the max I can get out of the Canon is also 320x240. Maybe I have been looking at this to long but I am stumped. Below is a sample of the action script where videoCapture should be 1024x768. What happens instead is a 1024x768 image is created with a black background and in the top left is a 320x240 image from videoCapture. I could obviously resize this but that would defeat the purpose being poor quality. Is there something I am missing here or maybe some limitation of Flash even?

[Code]....

View 1 Replies

ActionScript 2.0 :: Load Movie At Correct Size And Altering Position?

Dec 12, 2010

How can i get the file to load at the correct size by using the onloadInit at the moment the file is loading but its loading in the centre. [code]...

View 7 Replies

ActionScript 3.0 :: Saving Large Size Image?

Dec 21, 2010

in AS3 we use somthing like this to save image from SWF:

<AS>
import com.adobe.images.JPGEncoder;
var jpgSource:BitmapData = new BitmapData (sketch_mc.width, sketch_mc.height);
jpgSource.draw(sketch_mc);[code]....

Is it possible to save this sketch_mc in a larger size? Suppose its dimensions are 200x200 can we save it to 1000x1000 or something like that?

View 6 Replies

Professional :: Size Of Flash Movie Displaying Much Smaller Than It Should Be

Feb 18, 2010

URL...I can't seem to figure out why the swf file is so small. I published it at 100% width & height (I want it to be full screen) but it only shows up as 216 pixels tall.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved