Hi Jorge, this is my AS code, but the variable from PHP is undefined (from trace)...
var zSignal:Array=new Array();
var getFeed:LoadVars=new LoadVars();
getFeed.ref=this;
getFeed.load("http://localhost/php/sendtoflash.php?ck="+new Date().getTime());
getFeed.onLoad = function(success) {
if (!success) {
trace("Can not load");
} else {
loading_mc.removeMovieClip();
trace(this.toString());
trace("Loaded");
var records:Number=this.ref["records"];
trace(records);
if (records==0)
trace("No msgs yet");
else {
for (var i=0;i<records;i++) {
trace(this["s1"+i]+" "+this["s2"+i]+" "+this["s3"+i]+" "+this["s4"+i]+" "+this["s5"+i]+" "+this["s6"+i]+" "+this["s7"+i]);
zDP.addItem({c1:this["s1"+i], c2:this["s2"+i], c3:this["s3"+i], c4:this["s4l"+i], c5:this["s5"+i],c6:this["s6"+i],c7:this["s7"+i]});
}
}
}
}
zDg.dataProvider=zSignal;
stop();
...and the trace statements return these results:
wholePx8=0%2E00%0A%20%0D%0A&salePx8=0%2E00&oldPx8=1111%2E00&item8=s1&action8=act1&
tsp8=12%3A35%3A36pm&sID8=1&wholePx7=0%2E00%0A&salePx7=0%2E00&oldPx7=2222%2E00&item7=s2&
action7=act1&tsp7=12%3A35%3A45pm&sID7=2&wholePx6=0%2E00%0A&salePx6=0%2E00&oldPx6=2222%2E25&
item6=s2&action6=act2&tsp6=12%3A39%3A42pm&sID6=3&wholePx5=0%2E00%0A&salePx5=0%2E00&
oldPx5=1111%2E00&item5=s1&action5=act2&tsp5=01%3A25%3A12pm&sID5=4&wholePx4=0%2E0000%0A&
salePx4=0%2E0000&oldPx4=3333%2E2112&item4=s3&action4=act1&tsp4=01%3A55%3A48pm&sID4=5&
wholePx3=0%2E00%0A&salePx3=0%2E00&oldPx3=2222%2E25&item3=s2&action3=act1&tsp3=02%3A34%3A15pm&
sID3=6&wholePx2=0%2E00%0A&salePx2=0%2E00&oldPx2=1111%2E75&item2=s1&action2=act1&
tsp2=02%3A35%3A05pm&sID2=7&wholePx1=0%2E00%0A&salePx1=0%2E00&oldPx1=4444%2E80&item1=s4&
action1=act1g&tsp1=02%3A35%3A14pm&sID1=8&wholePx0=0%2E0%0A&salePx0=0%2E0&oldPx0=5555%2E0&
item0=s5&action0=act1&tsp0=02%3A35%3A18pm&sID0=9&%3Cbr%20%2F%3E%0A%3Cb%3ENotice%3C%2Fb%
3E%3A%20%20Undefined%20offset%3A%20%206%20in%20%3Cb%3EC%3A%5Chtdocs%5Cphp%
5Csendtoflash%2Ephp%3C%2Fb%3E%20on%20line%20%3Cb%3E15%3C%2Fb%3E%3Cbr%20%2F%3E%0A
%3Cbr%20%2F%3E%0A%3Cb%3ENotice%3C%2Fb%3E%3A%20%20Undefined%20offset%3A%20%205%
20in%20%3Cb%3EC%3A%5Chtdocs%5Cphp%5Csendtoflash%2Ephp%3C%2Fb%3E%20on%20line%20%3Cb
%3E15%3C%2Fb%3E%3Cbr%20%2F%3E%0A%3Cbr%20%2F%3E%0A%3Cb%3ENotice%3C%2Fb%3E%3A%20%20
Undefined%20offset%3A%20%204%20in%20%3Cb%3EC%3A%5Chtdocs%5Cphp%5Csendtoflash%2Ephp%3C%2Fb
%3E%20on%20line%20%3Cb%3E15%3C%2Fb%3E%3Cbr%20%2F%3E%0A%3Cbr%20%2F%3E%0A%3Cb%
3ENotice%3C%2Fb%3E%3A%20%20Undefined%20offset%3A%20%203%20in%20%3Cb%3EC%3A%
5Chtdocs%5Cphp%5Csendtoflash%2Ephp%3C%2Fb%3E%20on%20line%20%3Cb%3E15%3C%2Fb%3E%3Cbr
%20%2F%3E%0A%3Cbr%20%2F%3E%0A%3Cb%3ENotice%3C%2Fb%3E%3A%20%20Undefined%20offset%
3A%20%202%20in%20%3Cb%3EC%3A%5Chtdocs%5Cphp%5Csendtoflash%2Ephp%3C%2Fb%3E%20on%20line
%20%3Cb%3E15%3C%2Fb%3E%3Cbr%20%2F%3E%0A%3Cbr%20%2F%3E%0A%3Cb%3ENotice%3C%2Fb%3E%
3A%20%20Undefined%20offset%3A%20%201%20in%20%3Cb%3EC%3A%5Chtdocs%5Cphp%5Csendtoflash%2Ephp
%3C%2Fb%3E%20on%20line%20%3Cb%3E15%3C%2Fb%3E%3Cbr%20%2F%3E%0Arecords=9&onLoad=%5Btype%20
Function%5D&ref=%5Flevel0
Loaded
undefined
I don't understand why the variable records is undefined... which should have a value of 9.
Thanks for taking a look.
pt