パッケージflash.events
クラスpublic class SecurityErrorEvent
継承SecurityErrorEvent Inheritance ErrorEvent Inheritance TextEvent Inheritance Event Inheritance Object

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9

Flash® Player では、セキュリティエラーの発生をレポートする SecurityErrorEvent オブジェクトが送出されます。このクラスで報告されるセキュリティエラーは、通常は、データのロードなど非同期操作のものです。非同期操作では、セキュリティ違反はすぐには明らかになりません。イベントリスナーで、オブジェクトの text プロパティにアクセスすると、試行された操作とそれに関連する URL を確認できます。イベントリスナーがない場合、デバッグ版の Flash Player によって、text プロパティの内容を含むエラーメッセージが自動的に表示されます。セキュリティエラーイベントのタイプは、SecurityErrorEvent.SECURITY_ERROR のみです。

セキュリティエラーイベントは、すべてのターゲットオブジェクトに関して送出される最後のイベントです。つまり、一般的なエラーイベントを含むその他のイベントは、セキュリティエラーが発生しているターゲットオブジェクトに関して送出されません。

例を表示

関連項目

Security クラス
SECURITY_ERROR
Flash Player セキュリティ


パブリック プロパティ
 プロパティ定義元
 Inheritedbubbles : Boolean
[read-only] イベントがバブリングイベントかどうかを示します。
Event
 Inheritedcancelable : Boolean
[read-only] イベントに関連付けられた動作を回避できるかどうかを示します。
Event
 Inheritedconstructor : Object
特定のオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
Object
 InheritedcurrentTarget : Object
[read-only] イベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
Event
 InheritedeventPhase : uint
[read-only] イベントフローの現在の段階です。
Event
 Inheritedprototype : Object
[static] クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
Object
 Inheritedtarget : Object
[read-only] イベントターゲットです。
Event
 Inheritedtext : String
textInput イベントの場合は、ユーザーが入力した文字または文字の連続です。
TextEvent
 Inheritedtype : String
[read-only] イベントのタイプです。
Event
パブリック メソッド
 メソッド定義元
  
SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "")
セキュリティエラーイベントに関する情報を含む Event オブジェクトを作成します。
SecurityErrorEvent
  
SecurityErrorEvent オブジェクトのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。
SecurityErrorEvent
 Inherited
formatToString(className:String, ... arguments):String
カスタム Event クラスに toString() メソッドを実装するためのユーティリティ関数です。
Event
 Inherited
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
Object
 Inherited
イベントで preventDefault() が呼び出されたかどうかを確認します。
Event
 Inherited
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 Inherited
イベントのデフォルトの動作をキャンセルできる場合に、その動作をキャンセルします。
Event
 Inherited
指定されたプロパティが存在し列挙できるかどうかを示します。
Object
 Inherited
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
 Inherited
イベントフローの現在のノードおよび後続するノードで、イベントリスナーが処理されないようにします。
Event
 Inherited
イベントフローの現在のノードに後続するノードで、イベントリスナーが処理されないようにします。
Event
  
SecurityErrorEvent オブジェクトのすべてのプロパティを含むストリングを返します。
SecurityErrorEvent
 Inherited
指定されたオブジェクトのプリミティブな値を返します。
Object
パブリック 定数
 定数定義元
 InheritedACTIVATE : String = "activate"
[static] activate イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedADDED : String = "added"
[static] added イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedADDED_TO_STAGE : String = "addedToStage"
[static] addedToStage イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedCANCEL : String = "cancel"
[static] cancel イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedCHANGE : String = "change"
[static] change イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedCLOSE : String = "close"
[static] close イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedCOMPLETE : String = "complete"
[static] complete イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedCONNECT : String = "connect"
[static] connect イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedDEACTIVATE : String = "deactivate"
[static] deactivate イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedENTER_FRAME : String = "enterFrame"
[static] enterFrame イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedERROR : String = "error"
[static] error イベントオブジェクトの type プロパティ値を定義します。
ErrorEvent
 InheritedFULLSCREEN : String = "fullScreen"
[static] fullScreen イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedID3 : String = "id3"
[static] id3 イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedINIT : String = "init"
[static] init イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedLINK : String = "link"
[static] link イベントオブジェクトの type プロパティ値を定義します。
TextEvent
 InheritedMOUSE_LEAVE : String = "mouseLeave"
[static] mouseLeave イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedOPEN : String = "open"
[static] open イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedREMOVED : String = "removed"
[static] removed イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedREMOVED_FROM_STAGE : String = "removedFromStage"
[static] removedFromStage イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedRENDER : String = "render"
[static] render イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedRESIZE : String = "resize"
[static] resize イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedSCROLL : String = "scroll"
[static] scroll イベントオブジェクトの type プロパティ値を定義します。
Event
  SECURITY_ERROR : String = "securityError"
[static] SecurityErrorEvent.SECURITY_ERROR 定数は、securityError イベントオブジェクトの type プロパティ値を定義します。
SecurityErrorEvent
 InheritedSELECT : String = "select"
[static] select イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedSOUND_COMPLETE : String = "soundComplete"
[static] soundComplete イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedTAB_CHILDREN_CHANGE : String = "tabChildrenChange"
[static] tabChildrenChange イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedTAB_ENABLED_CHANGE : String = "tabEnabledChange"
[static] tabEnabledChange イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedTAB_INDEX_CHANGE : String = "tabIndexChange"
[static] tabIndexChange イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedTEXT_INPUT : String = "textInput"
[static] textInput イベントオブジェクトの type プロパティ値を定義します。
TextEvent
 InheritedUNLOAD : String = "unload"
[static] unload イベントオブジェクトの type プロパティ値を定義します。
Event
コンストラクタの詳細
SecurityErrorEvent()コンストラクタ
public function SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "")

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9

セキュリティエラーイベントに関する情報を含む Event オブジェクトを作成します。イベントリスナーには Event オブジェクトがパラメータとして渡されます。

パラメータ
type:String — イベントのタイプです。イベントリスナーは、継承された type プロパティを通じてこの情報にアクセスできます。エラーイベントのタイプは、SecurityErrorEvent.SECURITY_ERROR のみです。
 
bubbles:Boolean (default = false) — Event オブジェクトがイベントフローのバブリング段階で処理されるかどうかを判断します。イベントリスナーは、継承された bubbles プロパティを通じてこの情報にアクセスできます。
 
cancelable:Boolean (default = false) — Event オブジェクトがキャンセル可能かどうかを判断します。イベントリスナーは、継承された cancelable プロパティを通じてこの情報にアクセスできます。
 
text:String (default = "") — エラーメッセージとして表示されるテキストです。イベントリスナーは、text プロパティを通じてこの情報にアクセスできます。

関連項目

メソッドの詳細
clone()メソッド
public override function clone():Event

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9

SecurityErrorEvent オブジェクトのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。

戻り値
Event — 元のオブジェクトと同じプロパティ値を含む新しい securityErrorEvent オブジェクトです。

関連項目

toString()メソッド 
public override function toString():String

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9

SecurityErrorEvent オブジェクトのすべてのプロパティを含むストリングを返します。ストリングは次の形式です。

[securityErrorEvent type=value bubbles=value cancelable=value text=value]

戻り値
String — SecurityErrorEvent オブジェクトのすべてのプロパティを含むストリングです。

関連項目

定数の詳細
SECURITY_ERROR定数
public static const SECURITY_ERROR:String = "securityError"

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9

SecurityErrorEvent.SECURITY_ERROR 定数は、type プロパティ (securityError イベントオブジェクト) の値を定義します。

このイベントには、次のプロパティがあります。

プロパティ
bubblesfalse
cancelablefalse は、キャンセルするデフォルトの動作がないことを示します。
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
targetセキュリティエラーを報告するネットワークオブジェクトです。
textエラーメッセージとして表示されるテキストです。

関連項目

例の使用法
SecurityErrorEventExample.as

次の例では、SecurityErrorEventExample クラスを使用して、リスナーメソッド securityErrorHandler() をインスタンス化し、送出される securityError イベントを受け取るように設定する方法を示します。このイベントは、URLRequest の場所が呼び出し元の SWF と同じドメインになく、要求されたドメインが、クロスドメインポリシーファイルによるクロスドメインアクセス許可を得ていない場合に発生します。

SecurityErrorEvent を作成するには、http://www.[yourdomain].com をクロスドメインアクセスが許可されていないパスに置き換えます。

package {
    import flash.display.Sprite;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.SecurityErrorEvent;

    public class SecurityErrorEventExample extends Sprite {
        public function SecurityErrorEventExample() {
            var loader:URLLoader = new URLLoader();
            loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

            var request:URLRequest = new URLRequest("http://www.[yourDomain].com");
            loader.load(request);
        }

        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        }
    }
}




 

このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート

現在のページ: http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/flash/events/SecurityErrorEvent.html