FlashのNetStreamを使ったFLV再生

今日は、この為に4時間か、5時間も費やしました。。。
かなりむかつく限りです。。。


多分、悪いのはFlashだと思います。

function playFLV(flvURL:String) {
  var nc:NetConnection = new NetConnection();
  nc.connect(null);
  var stream:NetStream = new NetStream(nc);
  stream.onStatus = function(info) {
    switch (info.code) {
      case "NetStream.Play.Stop":
      case "NetStream.Play.StreamNotFound":
        _video.attachVideo(null);
        break;
    }
  }
  _video.attachVideo(stream);
  stream.play(flvURL);
}

これは、無反応で、

var nc:NetConnection = new NetConnection();
nc.connect(null);
var stream:NetStream = new NetStream(nc);
stream.onStatus = function(info) {
  switch (info.code) {
    case "NetStream.Play.Stop":
    case "NetStream.Play.StreamNotFound":
      _video.attachVideo(null);
      break;
  }
}
function playFLV(flvURL:String) {
  _video.attachVideo(stream);
  stream.play(flvURL);
}

だと、オッケー。。。


ビデオを置いてるタイムライン上のスクリプトじゃないと、
だめってことかな??


まだ、経験不足なとこも多々ある為、
Flashが悪いのか、ぼくが悪いのかもよく分かんない。。


むかついて、途中、
パソコンのディスプレイを殴りたかったです。。。
貧乏でパソコン買えんの思い出して、我慢したけん、偉い。。。