Language version: | ActionScript 3.0
|
The SecurityPanel class provides values for specifying
which Security Settings panel you want to display.
This class contains static constants that are used with the
Security.showSettings()
method. You cannot create new instances
of the SecurityPanel class.
View the examples.
public static const CAMERA:String = "camera"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the
Camera panel in Flash Player Settings.
See also
public static const DEFAULT:String = "default"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the panel
that was open the last time the user closed the Flash Player Settings.
See also
public static const DISPLAY:String = "display"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the
Display panel in Flash Player Settings.
See also
public static const LOCAL_STORAGE:String = "localStorage"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the
Local Storage Settings panel in Flash Player Settings.
See also
public static const MICROPHONE:String = "microphone"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the
Microphone panel in Flash Player Settings.
See also
public static const PRIVACY:String = "privacy"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the
Privacy Settings panel in Flash Player Settings.
See also
public static const SETTINGS_MANAGER:String = "settingsManager"
Language version: | ActionScript 3.0 |
When passed to Security.showSettings()
, displays the
Settings Manager (in a separate browser window).
See also
The following example shows how a
click
event on a Sprite object can be
used to show the Local Storage Settings panel of the Flash Player Settings. An orange box is added to the
stage using
draw()
. In
draw()
, a
click
event listener is
added named
clickHandler()
, which responds to
click
events by directing
Flash Player to open its Local Storage Settings panel.
package {
import flash.display.Sprite;
import flash.text.TextField;
import flash.events.*;
import flash.system.Security;
import flash.system.SecurityPanel;
public class SecurityExample extends Sprite {
private var bgColor:uint = 0xFFCC00;
private var size:uint = 100;
public function SecurityExample() {
draw();
}
private function draw():void {
var child:Sprite = new Sprite();
child.graphics.beginFill(bgColor);
child.graphics.drawRect(0, 0, size, size);
child.graphics.endFill();
child.buttonMode = true;
var label:TextField = new TextField();
label.text = "settings";
label.selectable = false;
label.mouseEnabled = false;
child.addChild(label);
child.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(child);
}
private function clickHandler(event:MouseEvent):void {
Security.showSettings(SecurityPanel.LOCAL_STORAGE);
}
}
}
© 2004-2022 Adobe Systems Incorporated. All rights reserved.
Wed Sep 28 2022, 6:12 PM GMT+01:00