PDA

View Full Version : problem with loading from external file...


yodalr
10-18-2005, 04:49 PM
My problem is next:
The movie works fine when there is 2 frames, and there is a button with "play" command, on the first frame, wht leads to the second frame. What i need is the code from second frame, working on first frame. When i do tht, it loads nothing to the combobox, any idea's why?

Sample:
http://www.zone.ee/avp2estclan/test2.swf

First frame actions:
loadVariablesNum("replaycars.php", 0);
stop();


Second frame actions:

stop();

arv = 0;

function uuenda() {
arv = arv+1;
bx1 = eval("car"+arv);

cars.addItem(bx1);
if (bx1 == undefined ) {
clearInterval(interval);
cars.removeItemAt(arv-1);
}





}
interval = setInterval(uuenda, 0);

anx
10-18-2005, 05:49 PM
your loading data with an old function .

you should look into LoadVars
like that you can get an onLoad listener handler to work for you so you dont need 2 frames.

hope that helps

good luck,

ben.

yodalr
10-19-2005, 01:36 PM
tnx it helped:

solution i found:
var my_lv:LoadVars = new LoadVars();
arvc = 0;
my_lv.onLoad = function(success:Boolean):Void {
function uus(){
arvc = arvc+1;
bx1c = eval("this.car"+arvc);
cars.addItem(bx1c);
if (bx1c == undefined ) {
clearInterval(intervalc);
cars.removeItemAt(arvc-1);
}
}
intervalc = setInterval(uus, 0);
}
my_lv.load("replaycars.php");