I have a movie player that works fine when i hard-code the url value in the video function, but when i try to pass that url/file path from an external file, the video doesn’t load. I suspect that there is something i’m doing wrong with the quotes. What am i doing wrong?
var vfile:String = string("path");
supervideo = function () {
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStream:NetStream = new NetStream (netConn);
video.attachVideo(netStream);
netStream.setBufferTime(10);
netStream.play(vfile);
};
loadText.load(_global.text_url1);
loadText.onLoad = function(success) {
if(success){
showtitle.text = this.title1;
vfile = this.flv_name;
supervideo();
}
}
The value in the php file looks like this:
&flv_name="elements/flv/superape.flv"&
So ultimately i want to end up with
netStream.play("elements/flv/superape.flv");
. I know the value of
vfile
is being passed from the php file and getting into the
supervideo();
function because i have a textbox echoing
vfile
. I have tried defining the variable with and without the “:String”. Please let me know if you can see any errors. Thanks!