Sean
Sean

Reputation: 509

Why is NetStream FLV playback broken when using a preloader?

I have some FLVs which I'd like to play. The following code works fine when running the SWF directly:

    var sUrl:String = m_pMovieUrlList[iMovieIndex];
    m_kNetConnection = new NetConnection();
    m_kNetConnection.connect(null);
    m_kNetStream = new NetStream(m_kNetConnection);
    m_kNetStream.client = this;
    m_kVideo = new Video();
    m_kVideo.attachNetStream(m_kNetStream);
    m_kMovieContainer.addChild(m_kVideo);
    m_kNetStream.play(sUrl);

However, when it runs inside of a preloader, I get a NetStream.Play.StreamNotFound NetStatusEvent. Why is that happening and how can I get it to work?

Upvotes: 1

Views: 857

Answers (1)

Sean
Sean

Reputation: 509

OK this turned out to be a really dumb thing. My URLs looked like this:

"./media/video/Video1.flv"

... and changing them to:

"media/video/Video1.flv"

... fixed the problem.

Upvotes: 1

Related Questions