-
Streaming from a server: html problems
Hi,
I'm hoping someone here can understand my problem.
I have a netStream loading an flv file from our server and it works great in the swf. However, when published to html it doesn't load the flv. I have a file search script that tells me the file is there so I know the swf can see it, but it just wont load the flv.
I believe the problem has to do with the way html handles the server's file path (i.e. //fs2/flash/movies/myMovie.flv). I know this has to be the case because if I point it to a local server with a drive name (i.e. U:/flash/movies/myMovie.flv) then it works fine in html.
Does anyone know how to get around this and get the html to load the file?
-
Senior Member
you need a cross domain policy file to use a URL as the path. do a google search for flash 8 cross domain policy file.......its straight forward to set one up.
-
I have a cross domain policy already set up. I really don't think that's the problem.
Here's my code:
Code:
// load cross domain policy
var myXML:XML = new XML();
myXML.ignoreWhite=true;
myXML.load("//server/flash/movies/crossdomain.xml");
myXML.onLoad = function(success)
{
if(success)
{
trace("cross domain loaded");
}
}
// variables to help me know the file exists and to load it
var filesearch:String = "searching";
var fileName:Object;
fileName = "//server/flash/movies/myMovie.flv";
// search for the file
var fileExists = new LoadVars();
fileExists._parent = this;
fileExists.onLoad = function(success)
{
if(success)
{
filesearch = "found";
// play movie
ns.play(fileName);
}
else
{
filesearch = "not found";
}
}
// run the function to search for the file
fileExists.load(fileName)
// have the variables set up to stream the movie
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(0);
tehMovie.attachVideo(ns);
When I publish in flash player it works fine. But if I publish in html, everything seems to work but the flv wont load.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|