Ok, we can do it another way without extensions.
I will write a little tutorial to hopefully explain a simpler process. In this example, we will have a 3 Frame move. On frame 1 you will have your main interface with buttons, textboxes and whatever. Extend it so that Frame 1 is visible on frame 2 and frame 3. Except on frame 2 and frame 3, add a label that says "Communicating with Server".
Now, on frame one, you need to add an action to a
button to initiate the call. You will also want to check your variables here before sending it but I'll leave that up to you. Also, flash sends all the variables that are local in your movie. You do not need to tell flash what variables to send.
So, put an action on the onclick event of your button:
This will initiate the call and move on to frame 2 to start the loop while we're waiting on data to be returned. Remember, that function executes and continues. The movie does not wait for the result but rather continues on. So, if you are wanting a result from your php page before continuing then you need to create a loop.
On frame 3, add this action to the frame:
That loop will continue moving from frame 2 to frame 3 until the loading is done. Once the loading is done, it will go to frame 1 and stop.
Now on the PHP side you will receive the variables just as they are named in your flash movie. So if you have two textboxes in your movie with vaiable names as textbox1 and textbox2, in php you would get that value like this:
OR
You do that for all your variables that you want to use from the Flash movie. From there you execute your database code and any other code. For brevietivity, I will assume you know that.
To return variables to the flash movie, you just need to print out the variables in this way.
lets say we have three variables that we want to return. One, $myresult, could say whether whatever action we did was successful, the other two could be the textbox1 and textbox2 variables. For lack of a better example, we'll just change the textbox1 and textbox2 values to return "Hello textbox1!" and "Hello textbox1!" respectivly.
example:
Your flash movie will now have the variable myresult in its scope.
If you need furthur help just let me know. It's been a while since I have done it this way. Also, this is for Flash 5 as most people use this version but is similair in MX.
Regards