AIR, Flex / Flash, FMS, PushButton, Game… Developer
Tip of the Day – Tricks of the microphone settings panel
I have an extensive background using the Microphone class within Flash Player. Anytime you try to connect to a user’s microphone, Flash Player displays a privacy dialog box that alerts the user to choose whether to allow or deny access to the microphone.
I’m sure you’ve seen it, this is what it looks like:

You widget (or app) MUST be a minimum of 216 x 138 (some people will argue you can do 215 wide, but in my testing sometimes 215 pixels wide can cause issues). When the player window is too small, the settings panel will either:
- Not show up at all, or
- Show up clipped and in some browsers mouse events will not register in Flash
You cannot disable the settings panel.
Here are a few helpful tips that I have figured out:
- The widget needs to be 216 x 138 ONLY when you’re asking for permission to the microphone. If you have control of Javascript on the page, you can change the size of the flash object on the page temporarily while you show the settings panel.
- You can use “Security.showSettings(SecurityPanel.PRIVACY);” to control when you want the settings panel to show up. Using the Security.showSettings method is helpful because there is a Remember button on that panel. If the user chooses “Remember”, then you never have to show the Settings panel again.
- The Microphone status events get dispatched when a user changes a Microphone setting within the settings panel. ( _mic.addEventListener(StatusEvent.STATUS, onMicStatus); )
- On your Microphone class, the “muted” property will tell you if you have access to the microphone or not.

These tips can be adapted for the camera settings panel as well.
| Print article | This entry was posted by Nate Beck on January 28, 2009 at 9:32 pm, and is filed under Actionscript, Flex, Tip of the day. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 9 months ago
Hi Nate, I’m having an issue with this. I’m working with one application that request Microphone access, my problem is when a user denies the access, How can I show the privacy dialog box again? I’m talking about the first one you show on this post. I have managed to check if that window was showed once, and if that is the case, show the second dialog box you show in this post via “Security.showSettings(SecurityPanel.PRIVACY);”, but that window doesn’t close automatically like the first one, so if the user accepts this time, the app starts recording before the user closes the window, and I don’t want this.
Have any idea?
Regards!
about 9 months ago
Hey Spike,
That’s simply a limitation that Adobe has given us. I don’t know of anyway to get the original Approve, Reject popup to come back up after they’ve denied access.
Cheers,
Nate