il metodo corretto è quello che stai utilizzando e nel request indichi un file php invece di quello di testo, ma chiaramente devi fare in modo che il file php restituisca un output come quello del txt
ad esempio se in php fai
in flash otterrai la variabile "ciao" in questo modoCodice PHP:<?php
echo "test=ciao";
?>
Codice PHP:var loader:URLLoader = new URLLoader(new URLRequest("test.php"));
loader.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event) {
try {
var variables:URLVariables = new URLVariables(event.target.data);
trace(variables.test); // output: ciao
} catch (e) {
trace(e);
}
}

Rispondi quotando