まず、ビデオオブジェクトにNetStreamオブジェクトをアタッチしてから、特定の開始イベントをリッスンする必要があります。
// create a new net connection, add event listener and connect
// to null because we don't have a media server
ncConnection = new NetConnection();
ncConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
ncConnection.connect(null);
// create a new netstream with the net connection, add event
// listener, set client to this for handling meta data and
// set the buffer time to the value from the constant
nsStream = new NetStream(ncConnection);
nsStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nsStream.client = this;
nsStream.bufferTime = BUFFER_TIME;
// attach net stream to video object on the stage
vidDisplay.attachNetStream(nsStream);
function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case "NetStream.Play.Start":
yourStartFunction();
break;
}
}
だけ再生ボタンにイベントリスナーを追加し、クリックをリッスン:それはこのような何かを行きます。 –
^ありがとうございました! – muudless