//------- SETUP NETSTREAM/CONTROLLER FUNCTIONS/LOADING BAR/SCRUB/TXT -----------
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
stream_ns.setBufferTime(7);
stream_ns.onStatus = function(info) {
if(info.code == "NetStream.Buffer.Full") {
bufferClip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferClip._visible = true;
}
if(info.code == "NetStream.Play.Stop") {
ns.seek(0);
}
}
my_video.attachVideo(stream_ns);
stream_ns.play("http://www.dedicatedmicros.com/ukftp/FLVHUB/FLV/1.FLV");
//------- DYNAMIC FLV/BUTTON CODE --------------------
applyButtonCode()
//
function applyButtonCode() {
//use a for loop to reduce repetition of the code
for(i=1;i<80;i++){
theButton=_root.scrollerMC.thumbscroll["vid"+i];
//this variable stores what number button it is
theButton.thisNum=i;
theButton.onRelease = function() {
//set stream
stream_ns.play("http://www.dedicatedmicros.com/ukftp/FLVHUB/FLV/"+this.thisNum+".FLV");
};
}
controllerMC.rewindBTN.onRelease = function() {
stream_ns.seek(0);
}
}