|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm not sure if this should go in the Flash or php forum so I'm trying both. I hope that's ok. I have successfuly loaded variables into Flash using a text file, but cannot get it to work with php. Here's what I'm trying:
PHP Code:
The Flash actionscript goes as follows: Frame 1: var c = new LoadVars(); c.load("/scripts/test.php", 0, "POST"); Frame 2 is labelled "wait" Frame 10: if (_root.c.done == "ok") { trace (_root.c); } else { gotoAndPlay ("wait"); } Now if I run this code, it just continually loops back to wait and never succeeds. If I try an alternative at Frame 10: trace (_root.c); I get this output: done=ok%22%3B%0D%0A%3F%3E&location=norfolk&%3C%3Fphp%0D%0Aecho%20%22name=david I've also tried c.load("scripts/test.php") with no success. Can anybody help? |
|
#2
|
|||
|
|||
|
Re: Problem passing variables from php to Flash MX
Quote:
Try moving c.load("scripts/test.php") to Frame 2. Since it's in Frame 1, your script is never going to load the new (updated) php data. Frame 10 is only going to see the (old) data that was loaded in Frame 1 (I think). |
|
#3
|
|||
|
|||
|
oops... sorry to dig this up... I didn't realize how old this was... that darn "related links" list at the bottom tricked me!
![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Problem passing variables from php to Flash MX |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|