views:

371

answers:

1

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?

A: 

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.

Sean
oh, how annoying! flex does something similar, when you're trying to add embeded images, if you have a / in front of the path, they work, if you don't have the /, it fails.
quoo