[flexcoders] Camera.get([index]); useing mutiple cameras
Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Camera.get([index]); useing mutiple cameras
I am assuming that localVideo and localVideo2 are instantiations of the Video class. Instead of using attachVideo, try using: localVideo.attachCamera(localCamera1); localVideo2.attachCamera(localCamera2); You shouldnt need the play() function. Here is an example using the camera on my blog (only uses one camera though): http://www.cynergysystems.com/blogs/page/andrewtrice?entry=capturing_still_images_from_a Hope that helps. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of willburforce82 Sent: Tuesday, August 08, 2006 9:55 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Camera.get([index]); useing mutiple cameras Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
RE: [flexcoders] Camera.get([index]); useing mutiple cameras
Your camera.get also isnt right. Try doing something like this: localCamera1 = Camera.getCamera(Camera.names[0]); localCamera2 = Camera.getCamera(Camera.names[1]); I remember reading a post on flexcoders a while back saying there was a bug in Flash 9 release candidate 15 (9.0.15). If you try to assign a camera by name, it would fail. Make sure you have Flash player 9.0.16. _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Trice Sent: Tuesday, August 08, 2006 11:08 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Camera.get([index]); useing mutiple cameras I am assuming that localVideo and localVideo2 are instantiations of the Video class. Instead of using attachVideo, try using: localVideo.attachCamera(localCamera1); localVideo2.attachCamera(localCamera2); You shouldnt need the play() function. Here is an example using the camera on my blog (only uses one camera though): http://www.cynergysystems.com/blogs/page/andrewtrice?entry=capturing_still_images_from_a Hope that helps. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: andrew.trice@cynergysystems.com Office: 866-CYNERGY From: [EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of willburforce82 Sent: Tuesday, August 08, 2006 9:55 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] Camera.get([index]); useing mutiple cameras Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Camera.get([index]); useing mutiple cameras
to willburforce: I ran into this problem several days ago, trying something like this var arr:Array = Camerag.names; Camera.getCamera( arr[1] ); note it's getCamera() not get(). as the menu says, the sigature of the Camera.getCamera() is public static function getCamera( name:String =null ):Camera but it failed me everytime when I try to assign a camera name to the method (I have four webcams attached to the box) Interestingly, the manual seems to suggest not passing any name to the method, instead, let user choose which camera to use via setting panel (which is not an option in the current video conference project). to Andrew: In your example, you were using getCamera() with no parameter passed in, could you please confirm if you can assign different names to it ? thanks. Jeremy. On 8/8/06, Andrew Trice [EMAIL PROTECTED] wrote: I am assuming that localVideo and localVideo2 are instantiations of the Video class. Instead of using attachVideo, try using: localVideo.attachCamera(localCamera1); localVideo2.attachCamera(localCamera2); You shouldn't need the play() function. Here is an example using the camera on my blog (only uses one camera though): http://www.cynergysystems.com/blogs/page/andrewtrice?entry=capturing_still_images_from_a Hope that helps. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of willburforce82 Sent: Tuesday, August 08, 2006 9:55 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] Camera.get([index]); useing mutiple cameras Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Camera.get([index]); useing mutiple cameras
Btw, I'm using 9.0.16 (both debugging and non-debugging) player. Same result. Jeremy.On 8/8/06, Jeremy Lu [EMAIL PROTECTED] wrote: to willburforce: I ran into this problem several days ago, trying something like this var arr:Array = Camerag.names; Camera.getCamera( arr[1] ); note it's getCamera() not get(). as the menu says, the sigature of the Camera.getCamera() is public static function getCamera( name:String =null ):Camera but it failed me everytime when I try to assign a camera name to the method (I have four webcams attached to the box) Interestingly, the manual seems to suggest not passing any name to the method, instead, let user choose which camera to use via setting panel (which is not an option in the current video conference project). to Andrew: In your example, you were using getCamera() with no parameter passed in, could you please confirm if you can assign different names to it ? thanks. Jeremy. On 8/8/06, Andrew Trice [EMAIL PROTECTED] wrote: I am assuming that localVideo and localVideo2 are instantiations of the Video class. Instead of using attachVideo, try using: localVideo.attachCamera(localCamera1); localVideo2.attachCamera(localCamera2); You shouldn't need the play() function. Here is an example using the camera on my blog (only uses one camera though): http://www.cynergysystems.com/blogs/page/andrewtrice?entry=capturing_still_images_from_a Hope that helps. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of willburforce82 Sent: Tuesday, August 08, 2006 9:55 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] Camera.get([index]); useing mutiple cameras Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
RE: [flexcoders] Camera.get([index]); useing mutiple cameras
I only have one camera, so I never tried it. Ive got flash player 9.0.16, but it looks like the error is still happening (although I found a workaround). I changed my code to: var arr: Array = Camera.names; trace(arr[0]); camera = Camera.getCamera(arr[0]); trace(Camera.getCamera(arr[0].toString())); and it returned null every time. I also started playing with it and did this trace(Camera.getCamera(0)); camera = Camera.getCamera(0); and it gave a valid reference to the camera. Try using the string representation of the camera index, instead of the camera name. Looks like this is still a bug in the player, but this could be a hack-ish workaround for it. _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Lu Sent: Tuesday, August 08, 2006 11:52 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Camera.get([index]); useing mutiple cameras to willburforce: I ran into this problem several days ago, trying something like this var arr:Array = Camerag.names; Camera.getCamera( arr[1] ); note it's getCamera() not get(). as the menu says, the sigature of the Camera.getCamera() is public static function getCamera( name:String =null ):Camera but it failed me everytime when I try to assign a camera name to the method (I have four webcams attached to the box) Interestingly, the manual seems to suggest not passing any name to the method, instead, let user choose which camera to use via setting panel (which is not an option in the current video conference project). to Andrew: In your example, you were using getCamera() with no parameter passed in, could you please confirm if you can assign different names to it ? thanks. Jeremy. On 8/8/06, Andrew Trice andrew.trice@cynergysystems.com wrote: I am assuming that localVideo and localVideo2 are instantiations of the Video class. Instead of using attachVideo, try using: localVideo.attachCamera(localCamera1); localVideo2.attachCamera(localCamera2); You shouldn't need the play() function. Here is an example using the camera on my blog (only uses one camera though): http://www.cynergysystems.com/blogs/page/andrewtrice?entry=capturing_still_images_from_a Hope that helps. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: andrew.trice@cynergysystems.com Office: 866-CYNERGY From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of willburforce82 Sent: Tuesday, August 08, 2006 9:55 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] Camera.get([index]); useing mutiple cameras Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Camera.get([index]); useing mutiple cameras
Thanks Andrew, this is a pretty cool hack, will try it and see if it works for me too. Jeremy.On 8/9/06, Andrew Trice [EMAIL PROTECTED] wrote: I only have one camera, so I never tried it. I've got flash player 9.0.16, but it looks like the error is still happening (although I found a workaround). I changed my code to: var arr: Array = Camera.names; trace(arr[0]); camera = Camera.getCamera(arr[0]); trace(Camera.getCamera(arr[0].toString())); … and it returned null every time. I also started playing with it and did this… trace(Camera.getCamera(0)); camera = Camera.getCamera(0); …and it gave a valid reference to the camera. Try using the string representation of the camera index, instead of the camera name. Looks like this is still a bug in the player, but this could be a hack-ish workaround for it. _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeremy Lu Sent: Tuesday, August 08, 2006 11:52 AM To: [EMAIL PROTECTED]ups.com Subject: Re: [flexcoders] Camera.get([index]); useing mutiple cameras to willburforce: I ran into this problem several days ago, trying something like this var arr:Array = Camerag.names; Camera.getCamera( arr[1] ); note it's getCamera() not get(). as the menu says, the sigature of the Camera.getCamera() is public static function getCamera( name:String =null ):Camera but it failed me everytime when I try to assign a camera name to the method (I have four webcams attached to the box) Interestingly, the manual seems to suggest not passing any name to the method, instead, let user choose which camera to use via setting panel (which is not an option in the current video conference project). to Andrew: In your example, you were using getCamera() with no parameter passed in, could you please confirm if you can assign different names to it ? thanks. Jeremy. On 8/8/06, Andrew Trice [EMAIL PROTECTED] wrote: I am assuming that localVideo and localVideo2 are instantiations of the Video class. Instead of using attachVideo, try using: localVideo.attachCamera(localCamera1); localVideo2.attachCamera(localCamera2); You shouldn't need the play() function. Here is an example using the camera on my blog (only uses one camera though): http://www.cynergysystems.com/blogs/page/andrewtrice?entry=capturing_still_images_from_a Hope that helps. -Andy _ Andrew Trice Cynergy Systems, Inc. http://www.cynergysystems.com Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@ yahoogroups.com] On Behalf Of willburforce82 Sent: Tuesday, August 08, 2006 9:55 AM To: [EMAIL PROTECTED]ups.com Subject: [flexcoders] Camera.get([index]); useing mutiple cameras Hi all, i'm new to action script, and working on a project that involves using multiple cameras in a single .swf i seem to be able to retreve the Camera.names and Camera.names.length which give me the names and number of cameras attached to my local computer but i can't seem to specify which Camera i want when i use Camera.get() to attach the video to each camera i know i have to use Camera.get(index) but i don't know what i'm doing wrong. this.cameranameslength = Camera.names.length; this.cameraNames.text = Camera.names; //this retrieves the names and number of cameras localCamera1 = Camera.get(index,[0]); localCamera2 = Camera.get(index,[1]); localVideo.attachVideo(localCamera1); localVideo2.attachVideo(localCamera2); play() // i can't specify each camera to a specific video feed. i'm getting a bit lost now can anyone help. willburforce __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___