flash.system

# SecurityPanel - AS3

Package | flash.system
Class | public final class SecurityPanel
Inheritance | SecurityPanel Object

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

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 Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | CAMERA : String = "camera" [static] When passed to Security.showSettings(), displays the Camera panel in Flash Player Settings. | SecurityPanel
|  | DEFAULT : String = "default" [static] When passed to Security.showSettings(), displays the panel that was open the last time the user closed the Flash Player Settings. | SecurityPanel
|  | DISPLAY : String = "display" [static] When passed to Security.showSettings(), displays the Display panel in Flash Player Settings. | SecurityPanel
|  | LOCAL_STORAGE : String = "localStorage" [static] When passed to Security.showSettings(), displays the Local Storage Settings panel in Flash Player Settings. | SecurityPanel
|  | MICROPHONE : String = "microphone" [static] When passed to Security.showSettings(), displays the Microphone panel in Flash Player Settings. | SecurityPanel
|  | PRIVACY : String = "privacy" [static] When passed to Security.showSettings(), displays the Privacy Settings panel in Flash Player Settings. | SecurityPanel
|  | SETTINGS_MANAGER : String = "settingsManager" [static] When passed to Security.showSettings(), displays the Settings Manager (in a separate browser window). | SecurityPanel

Constant Detail

### CAMERA

Constant

`public static const CAMERA:String = "camera"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the Camera panel in Flash Player Settings.

Related API Elements

Security.showSettings()

### DEFAULT

Constant

`public static const DEFAULT:String = "default"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the panel that was open the last time the user closed the Flash Player Settings.

Related API Elements

Security.showSettings()

### DISPLAY

Constant

`public static const DISPLAY:String = "display"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the Display panel in Flash Player Settings.

Related API Elements

Security.showSettings()

### LOCAL_STORAGE

Constant

`public static const LOCAL_STORAGE:String = "localStorage"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the Local Storage Settings panel in Flash Player Settings.

Related API Elements

Security.showSettings()

### MICROPHONE

Constant

`public static const MICROPHONE:String = "microphone"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the Microphone panel in Flash Player Settings.

Related API Elements

Security.showSettings()

### PRIVACY

Constant

`public static const PRIVACY:String = "privacy"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the Privacy Settings panel in Flash Player Settings.

Related API Elements

Security.showSettings()

### SETTINGS_MANAGER

Constant

`public static const SETTINGS_MANAGER:String = "settingsManager"`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

When passed to `Security.showSettings()`, displays the Settings Manager (in a separate browser window).

Related API Elements

Security.showSettings()
Examples How to use this example
SecurityExample.as
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.
Copy

    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);
            }
        }
    }

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00