Playing videos in directories with NetStream

I’m trying to make a program that plays external videos, and I’m using NetStream to play them, the videos for the most part work just fine.

The problem I’m having is that I want to place the videos in a directory (said directory is in the folder with the flash program), but when I do that, the video doesn’t play, I don’t get any errors or anything, it’s just blank.

For instance, if I use this code:

ns.play('video.flv');

it works just fine, but if I place the video in the directory, and use the code:

ns.play('Videos\\video.flv');

or:

ns.play('\\Videos\\video.flv');

it doesn’t work, plus I tried to use both backwards and forwards slash, just inj case.

What am I doing wrong?

i believe that the standard way to show a path is to use a forward slash

ie path/path/file.ext

thank you for replying.

Like I said, I tried both forward slashes and backward slashes, but neither worked.

Besides, that’s not the point, What I want to know is why won’t the video play when I place a directory.

And I forgot to mention that I’m using AS2, if that helps any.

You’re probably setting the wrong path. It needs to be relative to the location of the html file that embeds the swf, not the location of the swf. Use an http monitor such as fiddler and you will see if this is the case - it will show up as a missing file

I used fiddler, but nothing showed, most likely because I’m running a test off of Flash, and not actually using a browser or internet for that matter.

Just in case, I tried to play the explicit path, but it still doesn’t work.

Make sure you are monitoring all the available stream events. If you can upload an example it’d be easier for people to help