PDA

Volledige versie bekijken : PHP Variable in Actionscript


thyssimonis
%Europe/Berlin %826 %2008, 19:50
He

Ik wil in mijn ActionScript een php variable opvragen uit *.php bestand.
Hoe doe ik dit?

Mvg,

Thijs

ath92
%Europe/Berlin %915 %2008, 21:57
Zoek eens op SendAndLoad. Ik denk dat je dan al een stuk verder komt.

nls61
%Europe/Berlin %938 %2008, 22:31
Zoek op loadVars

thyssimonis
%Europe/Berlin %007 %2008, 00:10
Zover was ik ook al!

inge88
%Europe/Berlin %134 %2008, 03:14
var laadVar = new LoadVars();
laadVar.onLoad = laadMijnVar;
laadVar.load("jouwPHPBestand.php");

function laadMijnVar()
{
//in PHP als jouwVar=jouwVar echo'en oid
trace(this.jouwPHPVar);
}

thyssimonis
%Europe/Berlin %183 %2008, 04:24
Ik krijg met trace geen waarde, zonder trace dus wel

Lars93
%Europe/Berlin %369 %2008, 08:52
var lv = new LoadVars();
lv.load("JOUWPHPBESTAND");
lv.onload = function(success){
if (success){
trace(this.DEVARIABELEOMOPTEHALEN); //hier moet je de variabele invullen die je op wilt halen
} else {
trace("fout");
}
}


Mvg,
Lars93

da_robb
%Europe/Berlin %564 %2008, 13:33
Kijk hier:

http://www.flashfocus.nl/forum/showthread.php?t=48451