La web tiene un index.swf y en la primera seccion llama a un inicio.swf, lo cargo con este codigo
Código ActionScript :
carga = new MovieClipLoader();
objeto = new Object();
objeto.onLoadStart = function(clip) {
var bytes = carga.getProgress(clip);
porcen = bytes.bytesLoaded;
total = bytes.bytesTotal;
men.text = "Cargado "+porcen+" de "+total;
};
objeto.onLoadComplete = function(clip) {
var bytes = carga.getProgress(clip);
porcen = bytes.bytesLoaded;
total = bytes.bytesTotal;
if (porcen == total) {
precarga._visible=false;
}
};
objeto.onLoadError = function(clip, error) {
_root.mensaje.text = "Se produjo un error "+error+" verifique su conexion";
};
objeto.onLoadProgress = function(clip, cargado, total) {
porcen = bytes.bytesLoaded;
total = bytes.bytesTotal;
men.text = "Cargado "+porcen+" de "+total;
};
carga.addListener(objeto);
carga.loadClip("inicio.swf",contenedor);entonces dentro del inicio.swf esta el codigo para el video..
Código ActionScript :
var netConex:NetConnection;
var netStrea:NetStream;
var total:Number = 1;
var w:Number = mcTime._width;
netConex = new NetConnection();
netConex.connect(null);
netStrea = new NetStream(netConex);
netVideo.attachVideo(netStrea);
netStrea.play("spot.mp4");
netStrea.onMetaData = function(info:Object) {
total = info.duration;
mcTime.onEnterFrame = iniProgress;
btPlay._visible = false;
};
function iniProgress() {
txtTimer.text = seg2min(netStrea.time)+" / "+seg2min(total);
mcTime._width = w*(netStrea.time/total);
mcLoad._width = w*(netStrea.bytesLoaded/netStrea.bytesTotal);
}
function seg2min(num:Number) {
var min:Number = Math.floor(num/60);
var seg = Math.floor(num%60);
if (seg < 10) {
seg = "0"+seg;
}
return min+":"+seg;
}
btPlay.onRelease = function() {
netStrea.pause(false);
btPlay._visible = false;
}
btPause.onRelease = function() {
netStrea.pause(true);
btPlay._visible = true;
}Reviso el inicio.swf y el video sale todo bien con el audio y reviso el index.swf y me sale el video sin audio... q podrá ser ese error... es urgente para un cliente... Gracias por sus consejos
