Optimize and Customize the Settings
The camera in flash is a processor hog so you really want to limit the amount of data being run through the camera. The default settings in your project for the camera are 640 x 480 video, with 0.5 sample rate and 30 fps.
The first thing to consider is the camera’s frame rate. Do you really need 30 fps from the camera? This would be great if it didn’t cause your scene to run at 15 fps. So why have this set so high unless you are actually getting 30fps playback. I recommend playing with this setting a little bit to find a healthy compromise between the camera performance and overall scene performance.
Next are the dimensions. One option you have is to shrink all of the video in the scene to something smaller, but is that really a great thing? I mean, half the fun with Augmented Reality is that you have a big video and you are interacting with it. So just find the smallest possible size that meets your needs.
Finally, you have the sample ratio for the camera. This is a value between 0 and 1, where 0 is terrible and 1 is amazing. Tinkering with this value, I have found that around the default of 0.5 is a good balance of quality and speed so I usually leave this value alone but 0.4 or 0.45 may help out if you are REALLY desperate for speed.
If you take a look in the View class, there is an updateScene function that runs every frame. One thing that I like to do, is as follows: Once I have dropped the camera frame rate I also create a timer in the view class that runs at the same interval that the camera updates at. This means that the matrix isn’t being translated at every frame.
This may result in more choppy performance, but it may also make things a little bit smoother if you are finding that you app is really chugging along. You could also play with an easing equation on you enter frame function to compensate if this creates a choppy feel to the application.