I'm no programmer by any means, I've just hacked this out of the script from the forum here origianlly posted by ConnElite. I'm a little sketchy as to what's going on myself, but the php sends an update to the movie that changes the edit box to "Form Sent!" (&complete=Form Sent!), I want that action to trigger a goto scene and play, but no luck.......
Originally Posted by ForumNewbie
Hiya,
Whereabouts in your movie is the loadvariables command? I've had a look around, but I think I must be blind. I can't see it.
Not sure if you'd sorted this problem already, but I think the syntax in your if statement needs to be == instead of =.
This should test the value rather than setting it.
M.
Doubling up the equal sign keeps it from setting the variable, and I've attached an extra variable to the php that will set 'x' to equal 1. I added an edit box to test that it was going through, and x does in fact equal 1 when sent. I then tried the same set up as before, if x equals 1 go to scene and play, still no luck. I'm seriously going nuts here trying to think of a way to make this work..........
Yup, loadvars is the best way to do this, because of the onload functionality. (I haven't got it to work yet, but then I'm a lazy scripter )
If you stick with loadVariables, my gut feel is that some tinkering is needed with the loadVariables command. I always thought you had to use it as loadVariables('url','POST') but I saw somebody use loadVariables('URL','root') to solve a problem recently, and this worked to pull the loaded variables in as root.variablename. You could try putting the child name instead of root and this might do it.
Can you post the latest movie files and PHP script, and I'll try and find a bit of time to take a look?
.....here are the basics of the scene change(see attachment). I went ahead and used a layer instead of child movie in the main file(this is a stripped down version I'm using to test the 'ifthen/goto'), but I still need to get this interaction to work. I haven't even begun to dive into checking whether the boxes are filled or not yet, just shooting for some basic functionality at this point.
You'll notice that the edit box updates to 1 when it's sent, so x=1, I'm completely boggled by the fact that if x=1 it won't update the scene.......
Man I'm on tommorrow time myself, too much stress in this day today, gonna find a bar and go suck down some beer and do some kareoke for a while.......
You know that everything they do is logical, but I'll be blowed if I know how their logic works.
I attach a revised PHP script and movie that seems to do what you're after. I have no idea how I fixed it !
I think it may be to do with the additional ampersand symbol in the PHP script, or it may be to do with using a text 'Complete' message instead of just a number. Or it may be to do with changing the 'Editbox' with the complete flag in it to 'Read Only'. Or it may be because I deleted the 'Actions' element and recreated it. Who knows, but it works.
For problems addressing variables in child movies, buttons and layers, check out this thread here. When I saw your answer, I knew it rang a bell, and I think this might help you...
You know that everything they do is logical, but I'll be blowed if I know how their logic works.
I attach a revised PHP script and movie that seems to do what you're after. I have no idea how I fixed it !
I think it may be to do with the additional ampersand symbol in the PHP script, or it may be to do with using a text 'Complete' message instead of just a number. Or it may be to do with changing the 'Editbox' with the complete flag in it to 'Read Only'. Or it may be because I deleted the 'Actions' element and recreated it. Who knows, but it works.
For problems addressing variables in child movies, buttons and layers, check out this thread here. When I saw your answer, I knew it rang a bell, and I think this might help you...
The stripped down version works perfectly, but for some reason it won't work at all when put back into the main movie itself. I'm going to try a different route, but in the mean time I'm uploading my entire movie file. Hopefully someone with more knowledge than me can see where I'm going wrong with this.
Ok, I could never get the control I needed by using a child movie, or a layer, so I simply called a new page up, and set it to forward back to the main page when done. So my problem is for the most part solved.
I really would have liked to have it in the main movie, but it was way too much hassle and headache.
Again thanks to everyone for their help with this. I would have never gotten as far as I did without EVERYONES input, and the important thing is I have a functioning form that gets me the information I need(even if it's not nested in the main movie file).
Anyway, I'm off to eat lunch, and then move on to something a ton less stressful.