This content has been marked as final. Show 7 replies
check flashgods.org. there's a sample of code to submit form data using as2 (and as3).
so sorry, but my task is to find the error in my current script, not needing to rewrite the whole thing for that would not be neccessary at all.
You really do want to look at that example file. What you are currently doing has many problems. You are using Actionscript 1 methods, you really should be writing the actionscript to frame spaces and not directly on to the button objects. Using loadVariables() doesn't discriminate which variables it sends. It is really intended to bring data TO a Flash movie, not send it out.
You want to use the LoadVars() method. This allows you to select the text that you want to send and to more accurately specify the variable name that you are sending with the value string. Using sendAndLoad() you can further check to see that the data was recieved and show the user a result, if you like.
You might also want to do a search in this forum for "sendAndLoad". You'll find lots of additional information on sending data from a Flash movie.
Somehow what i did before with old methods WORKED. However, i recognize that i use old methods because im horrible at AS and merely copy scripts from project to project and adjust them - thus they begin to outdate. (or use bought components)
However, i have now tried to follow the instruction on flashgods but to little avail. Attached are the php and the new code. Would you please be kind to look it over for me? Here are the files Thank you so much for your effort so far, it means lots. :-)
What you have is pretty much correct. However, to properly test this, you need to mount both the .swf and the .php files on your server. You will also need to use a full URL to the .php file.
You might also want to tidy up that code that you have still attached to the button itself. You want to be sure that you don't have conflicting events.
Im grateful for Your time, Rob, but this is not working: not using full URL, not removing the commented code, not anything. (i has already uploaded the php to the server)
damn shame, gotta figure something else out.