|
-
Assigning Variables
I'm wondering???
I need to assign some "hidden" variables. In the last version is was simple. You simply LET "variable" = "value"
However, there doesn't appear to be a LET command in V4.
I was just going to make a SCRIPT and just enter it like this:
variable name="variable value"
variable name="variable value"
BUT does anyone know if this will pass the data as variables?
My first attempt was to create text boxes with the data in it and change the colors to that the text box couldn't be seen - Problem - When tabbing through the form, the EDIT boxes(Even the one's I want hidden)become selected.
Any thoughts???
-
Just a note...I just thought of a way, using the EDITBOX.
DE-Select the SHOW AT START OF MOVIE option {the little arrow button}
I still am curious if the scripting would work as well.
Another thought is, has anyone found a way to set TAB ORDER?
-
hates sounds in preloaders.
The TAB order depends on the position in the element list. If you want an edit box to not be selectable, uncheck the editbox "is selectable" and check the box "read only".
Yes, you assign a string to a variable by using
variablename = "variable value";
And if you want a boolean:
variablename = true or false
And a number:
variablename = number
-
KoolMoves Moderator
All variables are sent. So yes assigning them in script will work.
Not sure about the tab order. I had issues with that in the guest book example
By the way if we get the bugs out I've got a new simple guestbook example coming for v4!
-
Anyone figured out how to pass these variables?
In 3.7 there was an option under the OPEN URL box.
I can't find an equivilent in v4
-
KoolMoves Moderator
Everything is done in script now.....
loadVariables("URL","GET | POST")
So if you PHP script is at http://mydomain/mycode.php you would do:
loadVariables("http://mymydomain/mycode.php","GET");
Note the pulldown syntax help is missing the GET POST part. This is fixed in next beta.
-
That's great BUT, it didn't work.
Is there another Beta update?
-
KoolMoves Moderator
Hmmm it's working for me.....
Make sure to enclose either GET or POST in quotes.
-
where did you put the script?
Did you put it under the BUTTON DOWN action or did you put an OPEN URL under the BUTTON DOWN and just put the script somewhere else?
-
KoolMoves Moderator
Well in my paritcular movie I put it in the startup script as it is a guestbook and I want to retrieve entrys at the start. It's in a function in the start script and then the same script calls it. This way it can be called later when the entries need to be update from the database.
You should put it somewhere that it will be called only once when needed be it in a button action, in a scene action whatever.
-
Ok, I've found the problem.
You have to actually use a full URL. You can't use the root ./scriptname.php
It doesn't recognize that it's loading a webpage the above way.
Now, that I've figured that out. I'm running into a different problem.
One- once the variables are passed to my php script the flash program doesn't seem to do anything. HOWEVER the email that is supposed to be sent DOES get sent.
When I was using the OPEN URL method it would open the page and say "Thanks, your information has been sent."
Now, it does nothing. It stays on the flash file.
-
KoolMoves Moderator
Originally posted by dniezby
Ok, I've found the problem.
When I was using the OPEN URL method it would open the page and say "Thanks, your information has been sent."
Now, it does nothing. It stays on the flash file.
In you PHP do it this way
$sent=@mail(to,subject,message,header)
then send $sent back as a variable to the flash and have flash check the variable and when ($sent=true) display you thank you.
-
Very interesting idea....
I will look into that method.
I'm having a hell of a time getting my CONDITIONAL statements to work.
I'm posting the movie file in my other thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|