Bonjour à tous,
voila j 'essaye d'utiliser un sendAndLoad var en générant les variable grace a une boucle while mais g l 'impression que flash n'envoie pas les éléments .
merci de votre aide
le code:
on (release) {
//prepare variables
theemail = email.text;
thelogin = login.text;
thepass = passw.text;
stat = "justsave";
howmany = _root.showroom.lightbox.cuantoselected.text;
evento = _root.showroom.evento.text;
i = 0;
while (i<howmany) {
this["foto"+i] = eval("_parent.pedido.ordere"+i+".id").htmlText;
this["acabado"+i] = eval("_parent.pedido.ordere"+i+".theacabado").htmlText;
this["tamano"+i] = eval("_parent.pedido.ordere"+i+".thesize").htmlText;
this["cd"+i] = eval("_parent.pedido.ordere"+i+".thecd").htmlText;
this["qte"+i] = eval("_parent.pedido.ordere"+i+".theqte").htmlText;
i = i+1;
}
//create loadvars
gogoa = new LoadVars();
//create loadvars variables
gogoa.email = theemail;
gogoa.login = thelogin;
gogoa.passw = thepass;
gogoa.howmuch = howmany;
gogoa.statusclient = stat;
gogoa.evento = evento;
j = 0;
while (j<howmany) {
this["gogoa.foto"+j] = this["foto"+j];
this["gogoa.acabado"+j] = this["acabado"+j];
this["gogoa.tamano"+j] = this["tamano"+j];
this["gogoa.cd"+j] = this["cd"+j];
this["gogoa.qte"+j] = this["qte"+j];
eval("thepic"+j).text = this["gogoa.foto"+j];
j = j+1;
}
//send
gogoa.sendAndLoad("lephp.php",gogoa,"POST");
//receive
gogoa.onLoad = function(succes) {
if (succes) {
gotoAndStop(2);
} else {
trace("Error loading data");
}
};
}
Configuration: Mac OS X
Firefox 2.0.0.11