Цитата:
|
остановить выполнение главного кода
|
Это не возможно. Загрузка происходит асинхронно выполнению кода. Надо по другому реализовывать логику выполнения кода, бить его на блоки:
import mx.utils.Delegate;

Код AS1/AS2:
function save(info) {
var send:LoadVars = new LoadVars();
var result:LoadVars = new LoadVars();
result.onLoad = Delegate.create (this, onLoadData);
send.uid = 1234;
send.score = info;
send.sendAndLoad("site.ru/save.php?", result, 'GET');
}
function init() {
trace(1);
save(2);
}
function next() {
trace(3);
}
function onLoadData(success) {
if (success) {
trace('load ok');
next();
}
}
init();