Looping FLV files with Net Stream
March 25th, 2008 by steamfrog
Whole Code:
Add a new video instance to the stage & for this example name it “videoPlayer” without the quotes.
Go to Library

Then

Drag the video from the library onto the stage and give it an instance name of videoPlayer.
Add the code below on that frame.
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
videoPlayer.attachVideo(ns);
ns.play(”YOUR FLV FILE LOCATION IN HERE“);
ns.onStatus = function(info) {
if (info.code == “NetStream.Play.Stop”) {
ns.seek(0);
}
};
References:
http://www.tomontheweb.ca/Blog/2006/05/looping-flv.html
http://www.quip.net/blog/2006/flash/how-to-load-external-video




























