[FONT=Arial]Hy, guys!
I´m having a very difficult problem:
There are two swf that can not get the “totalBytes” of a jpeg file using loadClip class…
My code:
//criando um movie clip loader…
var fotosMCL:MovieClipLoader = new MovieClipLoader();
loaderFotos = new Object();
fotosMCL.addListener(loaderFotos);
//---------<codes para trigger>----------------\
// Iniciada a leitura dos dados
loaderFotos.onLoadStart = function(targetMC) {
targetFotos_mc._visible = false;
preloader_mc._visible = true;
};
// Durante…
loaderFotos.onLoadProgress = function(targetMC:MovieClip, lBytes:Number, tBytes:Number) {
targetFotos_mc._visible = false;
preloader_mc._visible = true;
preloader_mc.loadBytes_txt.text = lBytes;
preloader_mc.totalBytes_txt.text = tBytes;
var bytPerc:Number = Math.round((lBytes/tBytes)100);
var totalFrames:Number = preloader_mc.ponteiro_mc._totalframes;
var proximoQuadro:Number = Math.round((bytPerctotalFrames)/100);
preloader_mc.ponteiro_mc.gotoAndStop(proximoQuadro);
preloader_mc.infoSwf_txt.text = bytPerc;
};
//Acabada...
loaderFotos.onLoadComplete = function(targetMC) {
targetFotos_mc._visible = true;
preloader_mc._visible = false;
};
fotosMCL.loadClip(fotosURL+"foto0.jpg", "targetFotos_mc");
infoFotos_txt.text = "1/"+numFotos;
//---------</codes para trigger>----------------\\
var k:Number = 0;
function proxFotografia() {
if (k<=numFotos) {
var fotoX = fotosURL+"foto"+k+".jpg";
fotosMCL.loadClip(fotoX, "targetFotos_mc");
preloader_mc._visible = true;
}
// a chave abaixo fecha o if (k) das fotos...
}
proximaFoto_btn.onRelease = function() {
if (k<numFotos-1) {
k++;
proxFotografia();
var tN = k+1;
infoFotos_txt.text = tN+"/"+numFotos;
fotoAnterior_btn.enabled = true;
fotoAnterior_btn._alpha = 100;
} else {
proximaFoto_btn.enabled = false;
proximaFoto_btn._alpha = 45;
}
};
fotoAnterior_btn.onRelease = function() {
if (k>0) {
k--;
proxFotografia();
var tN = k+1;
infoFotos_txt.text = tN+"/"+numFotos;
proximaFoto_btn.enabled = true;
proximaFoto_btn._alpha = 100;
} else {
fotoAnterior_btn.enabled = false;
fotoAnterior_btn._alpha = 45;
}
};
But the most strange parts: testing the movie IN MY COMPUTER, everything is ok! But when I publish it, I lost the totalBytes number. :bad:
Here you see the problem:
-----Editing… (04/06) sorry for the broke link…--------
http://www.ppwebart.com/testes/intermarine/seminovosX.swf
If you check this link using IE, choose a button and the “preloader” of the MovieClipLoader appears. Then, the “0” at the right is a dinamic text box wich shows the “tBytes”… How the “tBytes” is = 0, my percent is “Infinity”…
If you test the swf with Firefox the right text box shows bLoad too… (???)
Now, at this link:
http://www.ppwebart.com/testes/intermarine/kirupaVideo/paraKirupaForum.html
you will see a fast video (19s) of my Flash testing the same swf, working fine…
I hope someone to help me.
Thanks a lot!
pp
pedropaulo@ppwebart.com
[/FONT]