Hi there,
I am trying to send an load vars from a php webpage...and see a progress bar!
How can i do that???
i am trying to do something like this:
first keyframe of the movie:
var dados = new LoadVars();
this.perc.mask.xscale=0;
root.loading=false;
onEnterFrame = function()
{
if(root.loading)
{
trace(t);
t=root.dados.getBytesTotal();
l=root.dados.getBytesLoaded();
if (l!=t)
{
this.perc.mask.xscale=Math.round(l/(t||100)*160);
}
else
{
onEnterFrame = null;
}
}
};
dados.onLoad = function(success)
{
if (success)
{
trace("Inserido com sucesso! 🙂 ");
this.statusclip.textostatus.text="DADOS ENVIADOS COM SUCESSO. VERIFIQUE O SEU EMAIL!";
}
else
{
trace("Erro ao enviar dados!");
this.statusclip.textostatus.text="ERRO AO ENVIAR DADOS. TENTE NOVAMENTE!";
}
};
stop();
then i have a button with the code:
on(press){
this.statusclip.textostatus.text="Enviando dados...";
root.dados.nome = this.nome;
root.dados.apelido = this.apelido;
...
root.loading=true;
root.dados.sendAndLoad("registar.php", "_self", "POST");
...
so where is the error??
MY t and l are undefined when the data is submitted...
what am i doing wrong here??
Regards