| パッケージ | net.user1.reactor.snapshot |
| クラス | public class ClientCountSnapshot |
| 継承 | ClientCountSnapshot Snapshot flash.events.EventDispatcher |
| バージョン : | Reactor 1.0.0 |
// スナップショットを作成します
var snapshot:ClientCountSnapshot = new ClientCountSnapshot();
// コールバック関数を登録します
snapshot.onLoad = function ():void {
trace("There are " + snapshot.getCount() + " clients on the server.");
}
// あるいはリスナー関数を登録します
snapshot.addEventListener(SnapshotEvent.LOAD, loadListener);
function loadListener (e:SnapshotEvent):void {
var loadedSnapshot:ClientCountSnapshot = ClientCountSnapshot(e.target);
trace("There are " + loadedSnapshot.getCount() + " clients on the server.");
}
// クライアントの数をロードするために、
// スナップショットオブジェクトをReactorのupdateSnapshot()メソッドに渡します:
reactor.updateSnapshot(snapshot);
関連項目
| メソッド | 定義元 | ||
|---|---|---|---|
コンストラクタ | ClientCountSnapshot | ||
getCount():int サーバー上の全クライアント数を返します。 | ClientCountSnapshot | ||
![]() | getStatus():String 最も最近のスナップショットのロード操作のステータスを返します。 | Snapshot | |
![]() | updateInProgress():Boolean スナップショットが現在データをロード中かどうかを示します。 | Snapshot | |
| ClientCountSnapshot | () | コンストラクタ |
public function ClientCountSnapshot()コンストラクタ
| getCount | () | メソッド |
public function getCount():int| バージョン : | Reactor 1.0.0 |
サーバー上の全クライアント数を返します。 カウントを更新するには、ClientCountSnapshotオブジェクトをReactorのupdateSnapshot()メソッドに渡してください。
戻り値int |
関連項目