ActionScript 3.0 :: Get Webcam To Detect Colors?
Oct 7, 2009
I'm working on a school project that will work so that a webcam can scan a grid of colors and determine what color it is and there by playing a sound tha is connected to that color. You can then create music by drawing different colors on a grid.I know that this is doable in AS3, I just don't know how exactly since im kind of new to this.So i managed to import the webcam image to flash, and that's all. How do I Proceed?
* How do i get the webcam to detect colors? (Green, Blue, Red, Yellow and Black)
* How do i connect these color detections to start playing a sound/movieclip?
View 1 Replies
Similar Posts:
Aug 9, 2009
Currently making a music project that will, in theory, play sounds based on detected colors a webcam can see.
I'm certain this is possible in either AS 2 or 3 - but unsure exactly how.
I've searched the wonderful nets for a tutorial or an example of this being done with flash but have come up with nothing.
Is there any tutorials for detecting colors and then responding to them? (All as viewed by webcam, so in real-time).
View 5 Replies
Aug 16, 2009
I need help with a small flash project i'm doing. Basically the task is to detect a color via webcam, then respond to what colors it can see (using the webcam). Example Color red is held in front of camera - flash sees this, then respond by playing a sound. green and red is held in front of cam, flash can tell there is two colors, plays a sound. etc would writing the webcam video object to a BMD every frame, then getPixel that to work out the colors? I'm guessing i'd need to use colorTransform to merge all the blues, reds, greens, etc together (so it only checks for those 3) then responds if it finds them with getpixel?
is there any examples of that, or something similar i could work from? would anyone be able to give a quick write up of what this might looklike/how to do it? (havent done much programming in as3) All i need it to do is: Check video for range of colours (ie, blue, light blue, dark blue, etc, all are equal to blue, unsure how i'd do this. Was thinking Yellow, Red, Green, Blue as the 4 colours) If any of those are in the video, then respond by playing a sound. (However if yellow and blue are in the video at the same time, play a DIFFERENT tune)
View 1 Replies
Jan 6, 2011
I searched forums and googled and not found anything on how to detect the Webcam supported resolutions in flash.The whole issue stems from the issue when I use Camera.getCamera() (only have one attached to my laptop) I'm always getting different values for camera.height and camera.width. Also some 720p cams have different aspect ratio then the old cameras.Is there possible to detect somehow what's the largets resolution is supported by a webcam? Or all possible resolutions supported?
View 2 Replies
May 29, 2009
im trying to detect when a webcam fails or is unplugged.
Code:
//Get webcam on the screen
var video_vobj:Video;[code]....
this is only executed at the start and i cannot tell if the camera is disconnected during the rest of the clip.Is it possible to check the connection for the life of the clip ?
View 1 Replies
Aug 27, 2009
Is it possible to detect the specific webcam hardware that a person is using to stream through flash? Assuming that the user has accepted the webcam security questions and is successfully streaming to a FMS server; Can some code we written so that I can tell if the user is using a lifecam vs another model. Ie. are there headers or some other signature that can be used to detect this?
View 1 Replies
Jul 15, 2010
Is there any way to detect webcam and microphone connections in runtime in flex.Suppose the clients are participated in a videoconnference .One of clients joins the conference without webcam.In meantime he connects to webcam as he in the conference.How to stream that user video to all connected clints.
View 5 Replies
Nov 20, 2011
I'm having a bit of trouble implementing a system that can detect night and day through webcam.
I've decided the best approach would be to detect the average colour of the webcam image, and through this it can be converted to grayscale and if its closer to black the background will be dark or if its white it'll be brighter.
What I'm having trouble doing is working out how to achieve this, I've been using the kirupa webcam tutorial but I've got no idea how to actually go about working out the average colour.[URL]..
View 6 Replies
Jan 11, 2012
Is there any possibility/workaround to detect if user's webcam supports 16:9 aspect ratio?
View 4 Replies
Oct 11, 2010
From a Flash object, I would like to be able to detect the presence of a webcam that the user might grant access to, without actually asking the user whether they want to grant access. This is to streamline a large application that has extra features if a webcam exists — if there is a webcam, the application will present several dialogs that lead up to the normal cam-security prompt, but if the user doesn't have the hardware, I want to skip over them altogether. Requesting access to the cam before those dialogs won't make sense to the user.
It appears not to be possible to call Camera.getCamera() without the security prompt happening. Is there a workaround? (For instance, could I, perhaps, call getCamera in a hidden Flash object and inspect its return value, or does it block until the user acknowledges the security prompt?)
View 3 Replies
Apr 26, 2010
I wonder what kind of class(es) I should use to accomplish this task. I have two predefined colors, 0xFF0000 and 0x00FF00 (red and green), and I would like to set a number of gradiants of colors between these two colors. [code]This generates a random color, but I don't want to generate just any random one. Does anyone know what kind of color class I should use to accomplish my task objective?
View 5 Replies
May 23, 2011
I want my site's users to be able to record videos straight from their webcams into my site. Videowhisper is one such tool which seems to work fine - [URL] But I'm looking for opinions on better / more scalable / reliable solutions. Paid solutions are fine.
View 4 Replies
Aug 11, 2009
If I'm creating a Flash file (ActionScript 3.0) based off of a Photoshop file, do I need to use web only colors in Photoshop? I creating a pop-up page for a site.
View 6 Replies
Aug 28, 2009
I want to make a box that changes color when the mouse rolls over it, and changes randomly between 10 different colors.
View 1 Replies
May 12, 2010
I am trying to style a DataGrid component so that the background is transparent (Flex 4). Rgba colors work fine if I make "alternatingItemColors" an attribute on the component, but if I try to declare it in my css stylesheet, I cannot declare the alpha value.
Works (mxml):
<mx:DataGrid id="songGrid" width="800" height="529" dataProvider="{songs}" itemClick="handleRowClick(event);" x="145" y="168" headerStyleName="dataGridHeader" alternatingItemColors="[0xFFFFFFFF, 0xFFFFFFFF]">
[Code]...
If I enter the values as "0xFFFFFFFF", I get a parse error, because it's not proper css (of course, most of flex's css isn't proper css, but I digress...). So, is there any way to declare the alpha value of these colors in the css?
View 2 Replies
Apr 13, 2005
I used the example of the "Changing Colors Using ActionScript" from your site to add to a rollover state on a movieClip. It works fine but how to I reverse the state when I rollOut. eg goes to black on rollOver and then back to its original full color image on rollOut?
View 3 Replies
Feb 5, 2006
I'm working on a Mac. Now I made a site and when I compare colors on pc I get a huge difference:s. My green grey looks like it's black. How do you manage to get the colors wright on both platforms? The calibration of my screen is perfect for print.
View 1 Replies
Jan 14, 2008
I've searched a few times, but I can't seem to find how to reverse this formula which takes Visual Basic's BGR format and turns it into RGB: var RGB = (color & 0x000000ff) << 16 | (color & 0x0000FF00) | (color & 0x00FF0000) >> 16 I need to take the RGB and turn it into BGR to feed into VB. I'm sure it's a simple bitwise operation, but I keep getting weird effects, like blue turns to green when it converts.
View 3 Replies
Oct 21, 2009
I have my first color from some code I found, so I did a screencap & sampled it in PhotoShop to get the hex color for the color chip that changes my grayscale bitmap to that color on rollover.
Code:
myColorTransform.ra = 50;
myColorTransform.rb = 244;
myColorTransform.ga = 40;
myColorTransform.gb = 112;
[code]....
hex is about #f9c480 and I'm cool with my first accidental color. But how do I get more colors. How to start with a hex color and figure out what to put for rb, ga, ba, etc?
View 2 Replies
Nov 28, 2009
I have several (300 actually) movie clips, just plain shapes, which I would like to change colors randomly by fading from one color to another. I would like each one to be different, so they don't appear as if they are all changing at the same time. Sort of a psychedelic effect...I've searched the web day and night and can't find anything thing even close.
View 14 Replies
May 13, 2010
I'm in a bit of a pickle with this problem. How the heck can I create a function which rotates a uint value gradually through all colors? E.g, start with red, fade to yellow, then green, blue etc. over time then back to red.een rattling my noggin (and google) now for a while but come up with noBthing that wouldn't be insanely long-winded. There must be an easy-ish way to do this?
View 5 Replies
Aug 10, 2010
Ive been editing a template for a photography website (in flash) but she wanted the font changed through out the site and the colour of this font changed to. Ive been playing around with it and managed to chage the font but only for some of it, but what ever im doing is having a knock on affect with other parts of the site.I have a index page and various other files and folders but dont know if im looking in the correct place.When i look at the libary of contents its not very clear what is what and cant see anything reffrencing the text.
View 1 Replies
Aug 2, 2011
Actually I am starting with AS, but what I see is that some tutoriales, have the script in blue, and other letters in green and red, is that important?
View 2 Replies
Oct 13, 2008
I'm trying to make an array of colors. I have uint's representing my colors now:
var btnColor:uint;
btnColor = 0x999999;
But when I trace these button colors, they come out funny.The color above comes out as:
10066329
And this is the way they get pushed into my array. I tried converting them to Strings:
arrBtncolor.push(String(btnColor));
But it was the same 10066329 that got put into the array. It must be a small thing I'm doing wrong, but so far, I haven't figured out what it is.
View 2 Replies
Oct 13, 2008
I'm trying to make an array of colors. I have uint's representing my colors now:
var btnColor:uint;
btnColor = 0x999999;
But when I trace these button colors, they come out funny. The color above comes out as:
10066329
And this is the way they get pushed into my array. I tried converting them to Strings:
arrBtncolor.push(String(btnColor));
But it was the same 10066329 that got put into the array.
View 3 Replies
Jun 6, 2009
I am exporting a RGB Illustration done in Photoshop with really strong colours. I export it for my website from the option save for web, (I also tried save as with all kind of formats) but the colors get really pale when I took it in Flash. I don't understand, the same image has really bright strong colors in Photoshop. I tried to play with the option from flash - color- advanced- alpha,but they just get darker or wierder.
View 9 Replies
Jun 8, 2009
In coloring an object using the toolbar fill palette, I'd like to simply be able to double click on the color swatch in the toolbar, rather than click on the swatch and mouse down to the color and click again with the eyedropper. What's happening is that the color swatch in the toolbar contains a variety of colors around the one that it nominally represents. e.g. If the swatch is ff0000, double clicking on the swatch is likely to color the selected object anywhere from f30000 to fe0000 depending on precisely where in the swatch you double click.
View 1 Replies
Jun 11, 2009
i need to change the animated logo's color in the left from green to blue.I have never done anything in flash before, this is the first time i've used the program, but so far i was able to figure out how to change the navigation and bar color and the text. but i can't seem to see where the color of this logo is coming from....
In screentshot 1 you can see that the Logo_Anim is made up of the Logo_1 - Logo_5 movie clips.Each of the logo_# clips is a piece of the logo.I'm not sure if something in the Logo_Anim is controlling the change in color of each piece of the logo, but it doesn't seem like the indiviual logo_#'s have any kind of setting..
View 3 Replies
Aug 10, 2009
I imported a .psd file that I created with Photoshop CS4 into Flash CS4 and the colors did not transfer over correctly. The colors (specifically the green text coloring) is a lot lighter/paler than they were in photoshop. How do I import a .psd over to Flash without the colors I used in Photoshop. Attached are a .jpeg image of what the photoshop file looks like and the resulting .SWF file after importing the .psd file.
View 2 Replies
Jun 9, 2010
Is there a file or some code I could make in order to add an extra color or two for syntax highlighting? Like having a certain color for function names and a different one for numbers etc.?
View 1 Replies