Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: Flash and Form fields?!? |
| From: | Nathan Dicken |
| Date: | Tue, 21 Sep 1999 22:15:51 +0100 |
Hi Shawn,
This can be done. Let's say your three variables are "email", "where", and
"body". On the submit button you could put this script (assuming your
button in on the main timeline):
On (Release)
Set Variable: "n" = "1"
Set Variable: "emailOk" = false
Loop While (n <= length( email ))
If (substring (email, n, 1) eq "@")
Set Variable: "emailOk" = true
Else
Set Variable: "emailOk" = false
End If
Set Variable: "n" = n+1
End Loop
If (emailOk = true)
If ((where ne "") and (body ne ""))
Go to and Play ("proceed")
Else
Go to and Stop ("redo")
End If
Else
Go to and Stop ("redo")
End If
End On
What you have here is a loop that goes through every letter of your "email"
field value and sees if there's a "@" in it. If not, it assumes that it's
not filled in correctly and returns a variable "emailOk" as false.
After searching through the entire email variable, there's a If/Else
statment that first checks to see if "emailOk" is true, and then if it is,
proceeds to see if the other two fields are not blank. If it's not true,
it immediately goes to the frame labeled "redo" to make you fill in the
email field correctly.
If all fields are filled in and the email variable has a "@", then the
movie goes to the label "proceed" or whatever you may have.
Hope this helps...
Nathan
--------------------------------------
Nathan Dicken
Fusionary Media
http://www.fusionary.com
>I am trying to create a very simple form that has three text fields.
>where
>and body, This form is working as we speak through the cgi scripts I
>created but the one thing that I would like to know is:
>
>Finaly the question :)
>
>Once this form has been filled out by the user, is there any way for me to
>have flash check to see if all the fields are filled out or to make sure
>that say the e-mail field had <anyword>"@"<anydomain>.
>
>Let me know if any of this can be done or am I just kicking a dead horse.
>
>
>Thanks.
>
>
>
>
>
>------------------------------------------------------------------------
>To UNSUBSCRIBE send: unsubscribe flasher in the body of an
>email to list-manager
>N.B. Email address must be the same as the one you used to subscribe.
>For info on digest mode send: info flasher to list-manager
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manager
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manager
Replies
Re: FLASH: Load variable questions, Nathan Dicken
FLASH: Flash and Form fields?!?, Shawn Boone
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

