[flashpro] Easy PHP question

Tyler Bullock tyler at tabullcreative.com
Fri Mar 11 10:48:16 EST 2005


This is the first time I've tried this and of course it is not working.

Ok, basically I am passing a Variable into flash through the FlashVars
attribute of the object and embed tags. This works fine. Then the variable
passed is used by Flash to call a script that loads a bunch of other
variables. This does not work.

Here is the AS code:

        var current_username = username;

        loadVariables("start_var.php", this, "POST");

        _root.name_txt.text = husband;


Here is the PHP script that is called by Flash loadVariables:

<?php

        $husband= "Tyler";
        echo "&husband=" . urlencode($husband);

?>

Everything with the dynamic text field in Flash is ok. The PHP script above
is a simple one to test that everything is working. Eventually I will be
pulling the data from a database, that's why I am passing the username to
the PHP script. Also, the PHP file is in the same directory as the SWF.

My guess is there is something simple I'm missing. Any help would be great.

Thanks,

Tyler




More information about the FlashPro mailing list