
Today a client would like to create a flash banner that load external flv file and keep the video in loop. Never ending playback. This is a more or less a beginner scripts for flash. There’s much we can do for this, if anyone is more interested on this kinda topics drop me a reply I will write more about this topic.
First on the first key frame open your action panel or press F9
var url = "http://ENTER YOUR URL HERE";
var nc: NetConnection = new NetConnection();
nc.connect(null);
var ns: NetStream = new NetStream(nc);
ns.setBufferTime(5);
ns.onStatus = function(info){
if(info.code == "NetStream.Buffer.Full"){
}
if(info.code == "NetStream.Buffer.Empty"){
}
if(info.code == "NetStream.Play.Stop"){
ns.seek(0);
ns.play(url);
}
}
//video location
myVideo.attachVideo(ns);
ns.play(url);
This is the code you will need to put in your timeline.
Simply change the var url = "http://ENTER YOUR URL HERE";
Replace this with your own flv.
I hope you have enjoyed this post, be sure to subscribe to my rss feed by click the subscribe button at the top.
Good Luck!



hi
thanks for the tutorial but when i uploaded to server i hear voice but no video is seen?
what went wrong? can you help please. http://www.khalidfaisal.name/flv/fatima.flv
thanks
khalid