AS=>php and php=>AS!

hi there,

question : I have a main.swf who loads a 2nd.swf on level 501 ( for exemple)

the 2nd.swf wants u to typ your email adresse and sends it to a verify.php to compare the email to the one in the database.

until here, it works !


the php sends : access=“ok” to 2nd.swf

but the variable send by php never arrives.

so, I tried the 2nd.swf alone without being load by another swf first. and it works. php sends access=“ok” to 2nd.swf.

why doesn’t it work when it first gets loaded on a different level than 0 ???

Surely a scope/targetting issue. Could you post your code? :wink:

here the script in a zip file

Here’s where the problem is:
[font=courier new]loadVariablesNum(“connexionphp.php”, 0, “POST”);[/font]

Why? It’s quite simple, actually. You’re loading the variables into level 0, no matter if you call the [font=courier new]loadVariablesNum()[/font] function from level 501. You could either 1) use the [font=courier new]MovieClip.loadVariables()[/font] method, or 2) specify the correct level into which the variables should be loaded.

  1. [font=courier new]this.loadVariables(“connexionphp.php”, “POST”);[/font]
  2. [font=courier new]loadVariablesNum(“connexionphp.php”, 501, “POST”);[/font]