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

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

未処理のデータのロードが完了した後で、Flash® Player によって DataEvent オブジェクトが送出されます。次の 2 種類のデータイベントがあります。

例を表示

関連項目

flash.net.XMLSocket


パブリック プロパティ
 プロパティ定義元
 Inheritedbubbles : Boolean
[read-only] イベントがバブリングイベントかどうかを示します。
Event
 Inheritedcancelable : Boolean
[read-only] イベントに関連付けられた動作を回避できるかどうかを示します。
Event
 Inheritedconstructor : Object
特定のオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
Object
 InheritedcurrentTarget : Object
[read-only] イベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
Event
  data : String
Flash Player にロードされる未処理のデータです。
DataEvent
 InheritedeventPhase : uint
[read-only] イベントフローの現在の段階です。
Event
 Inheritedprototype : Object
[static] クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
Object
 Inheritedtarget : Object
[read-only] イベントターゲットです。
Event
 Inheritedtext : String
textInput イベントの場合は、ユーザーが入力した文字または文字の連続です。
TextEvent
 Inheritedtype : String
[read-only] イベントのタイプです。
Event
パブリック メソッド
 メソッド定義元
  
DataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:String = "")
データイベントに関する情報を含むイベントオブジェクトを作成します。
DataEvent
  
DataEvent オブジェクトのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。
DataEvent
 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
  
DataEvent オブジェクトのすべてのプロパティを含むストリングを返します。
DataEvent
 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
  DATA : String = "data"
[static] data イベントオブジェクトの type プロパティ値を定義します。
DataEvent
 InheritedDEACTIVATE : String = "deactivate"
[static] deactivate イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedENTER_FRAME : String = "enterFrame"
[static] enterFrame イベントオブジェクトの type プロパティ値を定義します。
Event
 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
 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
  UPLOAD_COMPLETE_DATA : String = "uploadCompleteData"
[static] uploadCompleteData イベントオブジェクトの type プロパティ値を定義します。
DataEvent
プロパティの詳細
dataプロパティ
data:String  [read-write]

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

Flash Player にロードされる未処理のデータです。


実装
    public function get data():String
    public function set data(value:String):void
コンストラクタの詳細
DataEvent()コンストラクタ
public function DataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:String = "")

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

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

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

関連項目

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

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

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

戻り値
Event — 元のオブジェクトと同じプロパティ値を含む新しい DataEvent オブジェクトです。
toString()メソッド 
public override function toString():String

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

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

[DataEvent type=value bubbles=value cancelable=value data=value]

戻り値
String — DataEvent オブジェクトのすべてのプロパティを含むストリングです。
定数の詳細
DATA定数
public static const DATA:String = "data"

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

type プロパティ (data イベントオブジェクト) の値を定義します。

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

プロパティ
bubblesfalse
cancelablefalse は、キャンセルするデフォルトの動作がないことを示します。
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
dataFlash Player にロードされる未処理のデータです。
targetデータを受け取る XMLSocket オブジェクトです。

関連項目

UPLOAD_COMPLETE_DATA定数 
public static const UPLOAD_COMPLETE_DATA:String = "uploadCompleteData"

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

type プロパティ (uploadCompleteData イベントオブジェクト) の値を定義します。

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

プロパティ
bubblesfalse
cancelablefalse は、キャンセルするデフォルトの動作がないことを示します。
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
dataファイルのアップロードが正常に終了した後、サーバーから返される未処理のデータです。
targetアップロードが正常に終了した後、データを受信する FileReference オブジェクトです。

関連項目

例の使用法
DataEventExample.as

次の例では、XMLSocket が作成され、yourDomain の ポート 8080 で実行しているソケットサーバーに接続されます。イベントリスナーは、未処理のデータを受信するたびに送出される data イベントを受け取る XMLSocket オブジェクトにアタッチされます。

メモ :

package {
    import flash.display.Sprite;
    import flash.events.DataEvent;
    import flash.net.XMLSocket;

    public class DataEventExample extends Sprite {
        private var hostName:String = "[yourDomain]";
        private var port:uint = 8080;
        private var socket:XMLSocket;

        public function DataEventExample() {
            socket = new XMLSocket();
            socket.addEventListener(DataEvent.DATA, dataHandler);
            socket.connect(hostName, port);
        }

        private function dataHandler(event:DataEvent):void {
            trace("dataHandler: " + event.data);
        }
    }
}




 

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

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