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

Codice PHP:
<?php
echo "test=ciao";
?>
in flash otterrai la variabile "ciao" in questo modo

Codice PHP:
var loader:URLLoader = new URLLoader(new URLRequest("test.php"));
loader.addEventListener(Event.COMPLETEcompleteHandler);
function 
completeHandler(event:Event) {
    try {
        var 
variables:URLVariables = new URLVariables(event.target.data);
        
trace(variables.test); // output: ciao
    
} catch (e) {
        
trace(e);
    }