Unlike the previous MX version, the spark VideoDisplay component has no attachCamera function. The only other examples of Camera usage I have found have all revolved around attaching to a Video object. The problem is that this means you have to handle all the sizing etc... manually.
Solution
You can create a simple custom MediaElement class and add it to a MediaContainer in a custom UIComponent which will handle all of the sizing issues. This can be included via mxml in the same way VideoDisplay is.
Working with events in AS3 isn't as easy as it used to be in the past. While you need to monitor every event in your application there is no real easy way to do it without manually remembering all of your events and remembering to remove them on a one by one bases(ohi so much work...).
With all the new features and powers of AS3 came a lot of leg work. So many classes out there tried to tackle this issue from many interesting and different directions. But most of them demand a large learning curve and a big shift in the way you would interact with your code, some through a framework that locks you into a development style, some changed the way flash handles events.
Solution
Essentially Event Controller is an easier way to keep track of events in actionscript 3. Event Controller is a simple extension to your normal workflow that allows you to easily tag, group and remove any and all events, pause events and restore them when you want them back and more.
We know that there are many great solutions out there from very talented people. But we wanted to bring out another option the most simple one we could think about and we are with our ears to the community(so far in our 3rd revision) to making it even easier. The goal is to create the most simple yet feature rich event hub. Let unknown leaks be a thing of the past by taking our library out for a spin.
You need to communicate with device (in my case a biometric scanner) via RS232. This involves interpreting the serial output from the device and sending the device commands as required.
Solution
Use the freeware application 'Serproxy' to redirect serial communication with the device via a network socket connection to my Air application.
We know how to do it with functions how to set a default value when nothing comes through but what about variables such as in scenarios of flash vars where we just don't know until run time if we are going to get the variables or not.
Solution
Like anything cool in the world of programing there are a few options. The first is a traditional if statement asking our variable if its empty or not but then that wouldn't be such a cool trick if that was the full solution. come join in this is really cool...
Sometimes we need to be noticed when something such as a click on a button or when a new contact is added to our electronic schedule, for example. In these cases, Events are very useful and creating our custom ones we can listen to specific operations.
Solution
Building custom events we can verify specific operations that are happening in our app and make our code reusable for others.