[flashpro] Easy PHP question

Mike S. Krischker info at flash-list.com
Fri Mar 11 15:22:51 EST 2005


At 09:48 11.03.2005 -0600, you wrote:
>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);
>
>?>

Hi Tyler

Two things to consider: You should use the variables *after* loading
them. At the moment it looks like you're using them at the same time,
which doesn't work.

Also you should apply a check if everything is loaded.

Second, call the PHP page from within your browser and look at the string,
if it really does look right. Right now it starts with a '&', I'd recommend
starting blank and adding '&amp;' after each loop. Then at the very end,
add something like 'number=117'. You can use this as a load check reference
in your Flash movie (ie. if _root.number > 0 then proceed).

HTH   :)

Mike



More information about the FlashPro mailing list