PDA

View Full Version : iSight and Flash




asmith3006
Feb 20, 2007, 01:41 PM
Hi all.

According to http://www.communitymx.com/content/article.cfm?page=2&cid=BF6D4 this webpage it is very easy to display the iSight in a flash movie. However, when I run the attached sample code it doesn't run.

Would someone kindly try the files on their system to see if they work so I can be sure if it's my Mac or if it's something deeper.

Also, does anyone have any suggestions about how I could go about this if it doesn't work?

Cheers



Spanky Deluxe
Feb 20, 2007, 05:07 PM
I can't help with the programming side of things but I'm pretty sure YouTube has a live record via flash application that allows you to use a webcam such as an iSight. I swear I once fiddled with it and my iSight. You have to follow some instructions to right click and enable use of your iSight I think. Sorry for being vague!

asmith3006
Feb 20, 2007, 05:21 PM
You have to do the same with this, right click on it, settings, change it to Firewire IIDC or whatever. But it doesn't work... on my iMac at least. Most frustrating.

Does anyone fancy trying the files for me? Or following the instruction on the sight if you don't trust the files.

Spanky Deluxe
Feb 20, 2007, 05:47 PM
Attatch them on here and I could give it a look, I'm no pro at this stuff though.

asmith3006
Feb 20, 2007, 06:03 PM
it's too big to attach, but if you go to this link (http://www.theinquirer.net/default.aspx?article=8578) the zip file is at the bottom.

Cheers.

theFUZZYpickle
Feb 20, 2007, 06:32 PM
I'm not sure if you're working with AS2 or AS3, but here's the code for both:

AS2:
var my_video:Video; //my_video is a Video object on the Stage
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);

AS3:
var video:Video = new Video();
addChild(video); // Add the video object to the display list
video.attachCamera( Camera.getCamera() );

asmith3006
Feb 21, 2007, 03:21 AM
Neither of those worked for some reason..... I'm not sure what's going on.

Anyways, I've managed to get the sample files from the link I posts above to work now. It works if you select "USB" rather than "Firewire".

Does this mean the current iSight cameras connect with USB rather than firewire then?

I worked this out by going to the youtube recording page and the automatic setup thinggy found the camera on USB. Excellent stuff :)

Now I just need to work out how to record...... excellet :)

Thanks for the help.

Spanky Deluxe
Feb 21, 2007, 08:12 AM
Neither of those worked for some reason..... I'm not sure what's going on.

Anyways, I've managed to get the sample files from the link I posts above to work now. It works if you select "USB" rather than "Firewire".

Does this mean the current iSight cameras connect with USB rather than firewire then?

I worked this out by going to the youtube recording page and the automatic setup thinggy found the camera on USB. Excellent stuff :)

Now I just need to work out how to record...... excellet :)

Thanks for the help.

Ahhhhh, that exlains it. The internal iSights in the iMacs and MacBooks are USB. Only the external iSight is Firewire. ;)

asmith3006
Feb 21, 2007, 08:37 AM
don't you just hate it when it's something simple? At least if it's a complicated problem you feel a sense of achievement when you solve it. When it's something as simple as that I just feel silly :(

Spanky Deluxe
Feb 21, 2007, 11:29 AM
don't you just hate it when it's something simple? At least if it's a complicated problem you feel a sense of achievement when you solve it. When it's something as simple as that I just feel silly :(

Welcome to the world of computers - *especially* programming. Its *always* the simple things that get you!!

GrooveCafe
Mar 9, 2007, 10:44 AM
don't you just hate it when it's something simple? At least if it's a complicated problem you feel a sense of achievement when you solve it. When it's something as simple as that I just feel silly :(

Hello.
Do you think you are corresponding to iSight only because of the description of
ActionScript?

If it is it.

cam = Camera.get(3);//When three is selected, it seems to allocate iSight by the automatic operation.
dVideo.attachVideo(cam);
stop();

but...
It is likely not to function by the connection excluding iSight.

I have not used other cameras.

xenopehx
Jan 16, 2009, 12:44 PM
I found this, but not certain if it works across to the PC.

AS3 / CS4

var camera:Camera;
for(var i:int = 0; i<Camera.names.length; i++) {
trace(String(Camera.getCamera(i).name));
switch(Camera.getCamera(i).name) {
case "USB Video Class Video":
camera = Camera.getCamera(i);
break;
}
}

Mine traces out:
DV Video
IIDC FireWire Video
Google Camera Adapter 0
Google Camera Adapter 1
USB Video Class Video