Hi all!
I’m having problems with sending informatie to php and retrieving information.
This works:
- retrieving information from php and storing them with an for loop in an array in flash.
- Sending an variable from flash to php.
Now the problem is I want to combine these two things. The variable from flash tells the mysql query in php to get the next group (number 2 instead of number 1). Then flash has to retrieve to new group…
I think it has to be done with sendAndload() but i just can’t get it to work!
my code:
[AS]
sendAantal = new loadVariables();
sendAantal.bla = _global.bla;
randNum = int(Math.random()*100000);
varReceiver = new LoadVars();
varReceiver.bla = _global.bla;
varReceiver.sendAndLoad(“artikelen2.php?”+randNum, sendAantal);
varReceiver.onLoad = function (success){
if(success){
for (i = 0;i<4; i++) {
if (this['plaatje'+i] != undefined) {
materiaal = this['materiaal'+i];
// transfer information in arrays
}}
}}
[/AS]
Does anybody have an idear how to solve this??
thnx