Archive | August 2009

Flash Player privacy settings dialog disabled

When an application running in Adobe Flash Player is trying to access your camera or microphone. You should receive a privacy message similar to the one below, of course you should permit access:

However, sometimes you will find this message never exists and the program’s execution just stops here. Basically,that is because an important value in flash configuration file has been changed by anti-virus software. To solve the problem,you can simply delete this file or change the AVHardwareDisable value in this file from 1 to 0.

The configuration file “mms.cfg” is located in these places:

Windows(Vista, XP and 2000): %WINDIR%\System32\Macromed\Flash
Macintosh: /Library/Application Support/Macromedia
Linux: Flash Player 9 /etc/adobe/

While in this circumstance how could we inform user? In official document, it says: In ActionScript, an author can query the System.capabilities.avHardwareDisable property to determine the value of this setting. But when I query this it always returns 0 which means the hardware was not disabled,which indeed it was. Thus, we should consider that in most of the conditions,there is no event could be listened from system level,which means the block problem could not be captured directly.

To hack the problem, I always use this way and it really works fine. When you enable Camera or Microphone in your application like running Camera.get(), attach an alert Sprite to the top layer. The layer could be exactly the same size as(or smaller than) the privacy setting dialog, and be placed in the absolutely center of the stage like this:

It occurs to give user information when the system privacy message was disabled, and it’s masked by the system privacy message in normal conditions. It works fine! Of course, don’t forget to remove this Sprite when the Camera.currentFps property turns to be positive numbers.