tengo una carpeta con varios videos de diferentes tamaños, y un frame donde hago la seleccion del video ke quiero ver y las siguientes instrucciones:
function DisplayVideo(which, xpos, ypos) {
//if (_global.dataGathering.getVariable("act1_correct_" +which) == 0 && _root.silence.isSilence == true && _root.silence.val.toString() == "-1" && _global.dataGathering.getVariable("act1_video") == 0) {
//_global.dataGathering.setVariable("act1_video", 1);
this.createEmptyMovieClip("mc_placeholder", this.getNextHighestDepth());
this.mc_placeholder._x = xpos;
this.mc_placeholder._y = ypos;
this.mc_placeholder.attachMovie("mc_videoplayer", "mc_videoplayer", this.mc_placeholder.getNextHighestDepth());
//////////////////////////// Video
// Create a NetConnection object:
netConn = new NetConnection();
// Create a local streaming connection:
netConn.connect(null);
// Create a NetStream object and define an onStatus() function:
netStream = new NetStream(netConn);
netStream.onStatus = function(infoObject) {
//trace("Status (NetStream)"+newline+"Level: "+infoObject.level+newline+"Code: "+infoObject.code+newline);
if (infoObject.code == "NetStream.Buffer.Empty") {
trace("Buffer Empty");
this.play("videos/"+which);
}
};
this.mc_placeholder.mc_videoplayer.my_video.attach Video(netStream);
netStream.setBufferTime(5000);
netStream.play("videos/"+which);
////////////////////////////////////////////////
mc_placeholder.mc_videoplayer.play_btn.onRelease = function() {
netStream.pause();
mc_placeholder.mc_videoplayer.pause_btn._visible = true;
};
mc_placeholder.mc_videoplayer.pause_btn.onRelease = function() {
netStream.pause();
mc_placeholder.mc_videoplayer.pause_btn._visible = false;
};
mc_placeholder.mc_videoplayer.reload_btn.onRelease = function() {
netStream.seek(0);
};
mc_placeholder.mc_videoplayer.closeBtn.onRelease = function() {
lista.enabled=true;
netStream.close();
mc_placeholder.unloadMovie();
};
//}
}
var item=lista.selectedItem;
//item es el video ke kiero ver
oyente = new Object;
oyente.change=function(){
lista.enabled=false
item=lista.selectedItem.data;
video="vid_"+item+".flv"
DisplayVideo(video, 400, 195);
}
lista.addEventListener("change",oyente);
Mi pregunta es como le hago para ke se cargue todo el video y despues salga como un pre loader antes de cada video????