Application Development Tips and Tricks > Application design and development > Forcing the Player Settings panel to appear

 

Forcing the Player Settings panel to appear

When an application tries to access the user's camera or microphone, or to save data on the client machine, the Flash Player displays the Player Settings dialog boxes to get permission. The user can also open the Player Settings panels by right-clicking (Windows) or Control-clicking (Macintosh) on the player Stage. If you want to force the Player Settings panels to appear, use the following code:

// Opens the panel the user viewed last
System.ShowSettings();
// Opens the Privacy panel
System.ShowSettings(0);
// Opens the Local Storage panel
System.ShowSettings(1);
// Opens the Microphone panel
System.ShowSettings(2);
// Opens the Camera panel
System.ShowSettings(3);

For example, if your application requires the use of a camera, you can inform the user that they must choose "Allow" in the Privacy Settings panel, and then issue a System.showSettings(0) command. (Make sure your Stage size is at least 215 by 138 pixels; this is the minimum size Flash requires to display the panel.) For more information, see the System.showSettings entry in the Client-Side Communication ActionScript Dictionary.