I'm not sure if the logic here is best. But how can I make SECTION B loop over and over untill th if condition fails? is it possible to have 'ReceiveLoad2' inside a loop?
var numF:Number = 1;
var numC:Number = 0;
var ReceiveLoad2:LoadVars = new LoadVars();
goNext_btn.onRelease = function () {
numC = (numF-numF);
for (i=0; i<30; i++) {
if (_root.radioStage_mc["radioBtn"+i].textA.text != _root.radioStage_mc["radioBtn"+i].textB.text and numC < 1){
numC++;
SenderLoad.codeID = _root.radioStage_mc["radioBtn"+i].idNum.text;
SenderLoad.item = _root.radioStage_mc["radioBtn"+i].newCode.text;
_root.radioStage_mc["radioBtn"+i].updateS.text = "yes";
SenderLoad.sendAndLoad("http://www.web.com/D.php",ReceiveLoad2,"POST");
}
}
}
////SECTION B
ReceiveLoad2.onLoad = function () {
if (ReceiveLoad2.dat== "successful"){
for (i=0; i<30; i++) {
if (_root.radioStage_mc["radioBtn"+i].textA.text != _root.radioStage_mc["radioBtn"+i].textB.text and _root.radioStage_mc["radioBtn"+i].updateS.text == "" and numC < (numC + numF) and numC < 30){
numC++;
SenderLoad.codeID = _root.radioStage_mc["radioBtn"+i].idNum.text;
SenderLoad.item = _root.radioStage_mc["radioBtn"+i].newCode.text;
_root.radioStage_mc["radioBtn"+i].updateS.text = "yes";
SenderLoad.sendAndLoad("http://www.web.com/D.php",ReceiveLoad2,"POST"); //Here the ReceiveLoad2 repeats ONCE only. How can I make it loop over and over untill th if condition fails? is it possible to have 'ReceiveLoad2' inside a loop?
}
}
}