Trying to pass var from php to txt to flash

I’m trying to pass variables from php to a text file and have it display in a swf.
ultimately the first_name var will come from a database.

my actionscript is as follows:



loadText = new LoadVars();
loadText.load("firstname.txt", 0,"GET");
loadText.onLoad = function() {
loadedText.text = this.first_name;
loadedText.html = true
scroller.htmlText = this.first_name;
};

my text file:

first_name=<?echo " id:$_GET[first_name]";?>

my html code:

<param name=FlashVars value="first_name=john"/>
<embed src="main.swf" FlashVars="first_name=john"/>

when i test my movie it should say “John” in my text field. Am I missing a php file? can the .txt file get a variable from a php file?

I hope this makes sense.

Thanks for your time.