doubt anyone will ever find themselves in a similar situation but i managed to resolve this by creating a function out of the above code and re-calling it for every value of ' i ' only when a response was received from the server.
Code:resp = new LoadVars() vars = new LoadVars(); i = 0 save_players(i) function save_players(i){ trace("i value:" + i) vars.uid = _root["shirt" + i].shirt_contents.uid; vars.xposition = _root["shirt" + i]._x; vars.tid = tid; vars.yposition = _root["shirt" + i]._y; vars.eof = 0; vars.sendAndLoad("formationproc.cfm", resp, 'POST') if(i == (my_xml.childNodes.length - 1)) { vars.eof = 1; } resp.onLoad = function(success) { i = i + 1 if(i < my_xml.childNodes.length) { save_players(i) } else { removeMovieClip(blackout1); removeMovieClip(loader1); gotoAndStop(1) } } }




Reply With Quote