this really has nothing to do with PHP, and everything to do with Flash. I'd try asking in a forum to do with that instead. you've already done the part that involves PHP. you're interested in setting Flash button text, though, and I'm not sure if anyone here can help you all that much.

I bet ActionScript could have parsed the XML file, too. you might want to try looking into just opening an XML file within Flash and taking stuff from it, instead of trying to use PHP as a middle-man.

either way, the PHP part of this equation is finished.