Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Using Actionscript To Validate Email Address'?



wotcha,

here's a toughy... how do i get a pretty picture into my flash movie....

ha ha

only joking,

SERIOUSLY

I need to validate that email addresses entered into my flash form are valid, i.e. they have a @ and a .

And also preferably that phone numbers are the right length.

I'm pretty damn good at actionscripting logic and the like, but i'm ****e at bloody maths/variables/arrays etc.

I've got an amazing javascript plugin thing for dreamweaver, but it would be a hell of alot better to do it in Flash.

Many thanks in advance...

Chris

http://www.fumelondon.fsnet.co.uk



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-18-2002, 05:45 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Validate Email Address
code someone tell me how i can validate an email address in a form.

cheers

Validate An Email Address
Hello

I am using this to validate email addresses and it does not seem to work:

} else if (!email_txt.length || email_txt.indexOf("@") == -1 || email_txt.indexOf(".") == -1) {
status_txt.text = "Invalid Email.";

I would, in any case, prefer to use the following server script for validation purposes:

<%
'Email
re.Pattern = "^w+@w+.w+"
If Not re.Test(email) Then
errorArray(1) = "red"
ErrorMsg = ErrorMsg & "<center>Please type in a valid email address</center>"
end if
%>

If I use this server script, how do I begin to show it in my movie, please? What Action Script do I use to 'pull it in' from the server and show it?

Many thanks

Steve

Best Practice To Validate An Email Address?
Hi ppl,

I'm trying to define the requirments for email address validation. From what I have now I know I need to check to see if it contains the "@" and the presence of a dot. However, I'm sure there is some sort of function that does a more reliable validation. I'd appreciate any thoughts or suggestions on the matter.

Cheers,

McMurphy

Validate Email Address Format
I need some input on the best and most effective way to validate the format of an email address that a user enters into a Flash form. The purpose of this is to prevent the following:

asda.com
adaas@.com
asd
adasda@com
asdas$asd@asda.com

etc

Thank you in advance.

Used Php Email Tutorial From Kirupa, Need Email Validate Help
Hi,

I followed Senocular's tuorial to be able to send a form thru email in flash, it worked (which is great, since i also followed about 100 far more complicated ones i found on the web wich did not work!) but i need some help including an email validation element...i think its targetting the correct textfield variables i'm having a problem with, but i took all my efforts out of the attached files and now just have the functioning regular version and am awaiting some help...i have been at this for almost a week!!!

Ive attached a zip of my .fla and the php script.

Many many many thanks in advance,

sleeepy

Send An Email With The Users Email To An Email Address
ok..the subject may be a little confusing but this is what i have...

an input textbox where viewers type in their email address
a submit button

i want it so that when you hit submit after typing in your email address it sends an email to your@address.com providing you with whatever the person typed in the input textbox

is this possible without using php or asp or whatever?

peace
spen

Re-type To Validate Email
Hi,

I have a php email form in flash that is working great.. but I need to make it so the user ahs to re-type their email and match it w/ the other email field (to confirm they've typed it correctly). Does anyone have a good example of how to do this this??

Thanks!

Email Validate Problems :(
PHP Code:



action = "send";error1 = "User ID Required";error2 = "Password Required";error3 = "User ID & PASS. Required";function post() {if ((user == null) || (user == "")) {error = error1;action = "";}if ((password == null) || (password == "")) {error = error2;action = "";}if ((user == null) && (password == null) || (user == "") && (password == "")) {error = error3;action = "";}if ((validate(user)) && (user != error1) && (user != "") && (password!= error2) && (password != "")) {action = "send";gotoAndPlay("go");}} 





this validatity seems to be not working properly with..
everything works but if i fill the user & the password field also it doesnt go to the level "go" and plays the frame can some one help me out with this?
PHP Code:



gotoAndPlay("go"); 

Email Validate Problems :(
PHP Code:



action = "send";error1 = "User ID Required";error2 = "Password Required";error3 = "User ID & PASS. Required";function post() {if ((user == null) || (user == "")) {error = error1;action = "";}if ((password == null) || (password == "")) {error = error2;action = "";}if ((user == null) && (password == null) || (user == "") && (password == "")) {error = error3;action = "";}if ((validate(user)) && (user != error1) && (user != "") && (password!= error2) && (password != "")) {action = "send";gotoAndPlay("go");}} 





this validatity seems to be not working properly with..
everything works but if i fill the user & the password field also it doesnt go to the level "go" and plays the frame can some one help me out with this?
PHP Code:



gotoAndPlay("go"); 

Validate An Email And Do 2 Actions Based On Validation
I need to validate an email address, one simple textfield in a flash file...If the email address is valid you I need a GetUrl function pointing to a php page that processes the form, if the email address is not valid I need to jump to a scene in the flash movie that says "Please enter a valid..."

Can I just modify this actionscript to work? Please Help?

on (release) {
if (email.indexOf(" ") != -1 || email.indexOf("@") == -1 || email.indexOf(".") == -1 ||email.length<6||email.lastIndexOf(".")<email.ind exOf("@")) {
show = "Error";
} else {
show = "Correct";
}
}

Help Modifying This Script To Validate 2 Email Input Fields
Hi,

I have a script that i have been using for some time now to add a subscriber functionality to my sites. It consists of an input text field for an email address, and a submit button. When the submit button is pressed, the input text field is checked for valid email address syntax, and if its true, the user goes to the next frame where there is a thankyou message, and if its false, a text saying 'please make sure you entered a valid email' is made visible. There is also a reset button clearing the input field.

I did not write the script myself (((shame))). I am now trying to use this same script as a 'tell-a-friend' script, and so all I really want to do is have 2 input text fields checked for correct email syntax input, but I'm confused as to how to modify the code...I have tried a bunch of stuff.....

Below is the original script and I would be very grateful if anyone could help me out here. The ONLY modifcation I have made so far is to add a second input text field and called it 'email2', and made the default for that input field empty......

Many Many Thanks in advance!!

Cheska

CODE:




stop();
// Making the default setting for below mentioned textfields
email1 = " ";
email2 = " ";
//
//-------------------------------------------------------
// Submit Button action
submit.onRelease = function() {
//Add Path of the php file
feedbackpath = "form/mailto.php";
//
str1 = email1.indexOf("@");
str2 = email1.indexOf("@")+1;
str3 = email1.charAt(str1+1);
str4 = email1.lastIndexOf(".");
str5 = email1.charAt(str4+1);
len = length(email1);
counter = 1;
flag = 0;
while (Number(counter)<=Number(len)) {
Char = substring(email1, counter, 1);
if (Char ne "@") {
flag = Number(flag)+1;
}
counter = Number(counter)+1;
}
//E-Mail Address validation
if (str4<=str2 || str3 == "." || str5 == "" || Number(flag) != Number(len-1)) {
condition2 = "";
emailmark._visible = true;
} else {
condition2 = "ok";
emailmark._visible = false;
}

if (condition2 == "ok") {
loadVariablesNum(feedbackpath+"?name="+name+"&emai l1="+email1+"&feedback="+suggestion, 0);
gotoAndStop(2);
}
};
//
//-------------------------------------------------------
// Reset Button action
reset.onRelease = function() {
// Making the default setting for below mentioned textfields
email1 = " ";
// Making '*' Marks Invisible
emailmark._visible = false;
};

[F8] Do You Know How To Send An Email To An Email Address
Do you know how to send an email to an email address with a predetermined message from flash using Flash & PHP????

Actionscript Will Not Validate Buttons?
Hi All,
I am new here and wondering if anyone can help me?
I can send a preliminary test FLA file that I have started for reference to anyone who can help.

Problem 1:
I have a navigation that already has a code attached to it and I can not get the code to evaluate the button status properly. Meaning if I select onRelease, onRollover, onRollout, the buttons do not return to their normal state. The buttons only remain in the "down" or onRelease state.

Problem 2:
The images are attached movies.
I would like to preload all images with a preloader.
The images would appear onRollover and onRelease would remain until another onRolover button is selected.

Here is a partial code:
//---------------------------------------------------------
// goFrameOne function
//---------------------------------------------------------
function goFrameOne(n) {
nw = eval("_level1.navAll_mcA"+n);
for (i in navAll_mcA) {
if (navAll_mcA[i] != nw) {
navAll_mcA[i].gotoAndStop(1);
if (navAll_mcA[i] == sound_mc && _root.soundPlay == false) {
navAll_mcA[i].gotoAndStop("down");
}
}
}
}

The function will not validate the buttons because the buttons do not reside on the same root level. The buttons are actually located in another movie entitled "nav.navAll_mcA". Meaning "nav" is holding the "navAll_mcA clip.


I am not sure if this is all clear please let me know if I would need to clarify further.

Any help would be kindly appreciated...

Form To Email Address
I have an swf file, that is loaded (loadmovie) into another swf file. I am wondering how I can make a form submit the users email address (for mailing list) I have it all created, tried about 3 different types, both cgi & asp, and no luck at all. I would appreciate help, because I really need to get this working.

Thanks!

Email Address Submission?
I have an swf file (flashbottom.swf) which is loaded into main.swf. It all loads and everything, and in flashbottom.swf I have a form for mailing list. All they have to enter is their email address then press the submit button. For some reason, it just won't work! I've tried many different tutorials and open source, still no luck. I'd appreciate any help!

P.S. I don't want a mailing list script, just something that sends to my email, because I would like to add addresses manually

Check 2 Email Address
Hello.

I have a recomend bit on my site.
I have the script to check one e-mail but I cannot work out how you can check two.

The script I'm using at the moment is:

on (release, keyPress "<Enter>") {
if ((vemail.indexOf("@") != -1) && (vemail.indexOf(".") != -1) && (length(vemail)>5)) {
action = "Send";
loadVariablesNum("membership.php", 0, "POST");
nextFrame();
} else {
vemail = "PLEASE ENTER EMAIL";
action = "";
stop();
}
}





How can I alter this so it would check two ??

The script above checks the - TEXT BOX: "vemail" but i need it to do the same thing with TEXT BOX: "femail" too.


If you want have a look at what I done so far , check http://www.feneo.com (Its at bottom Left)

I'm so stuck. Pleeeeeeeeeease help

Thanks in advance


Dihan.com

Linking To An Email Address
Hey all, Im pretty new to flash and i am currently working on a flash site that needs to be able to link to an email address. I have tried many things but none work. How would i accomplish this?

Thanks
KaOs

How To Link Email Address
Hi guys...I dont practice much in Flash and now I am trying to create a website.....


Can someone tell me how can I link an email address to a Name? I cannot figure that thing out...


thanks

Malik

Email Address Linkage
hey, i want a link on my website which will enable the user to email me when clicked just like on a normal html site. i tried linking it to go to a webpage then typing "mailto:email@address.com" but the link doesn't work. how can this be done? your help would be much aprepriated

cheers. mark.

Linking To An Email Address? How
Though I am not a newbie... but this IS a newbie question. I cannot figure out how to link to a 'mailto:' address. I want to link a line of text to an email address. I have a line of text I have converted to a button and then with object actions I have added "on mouse event" "get URL", then inthe url box I added the html command 'mailto:name@place.com'

This did not work... what do I need to do?

Email Address In Flash
I have an email address on the stage that when user clicks on it, the mail browser would open up. How would I do this?

Thanks in advance!

Submit To An Email Address [F8]
This is the code I have on my submit button for a email address to be sent for a newsletter subscription to a site the email bit is working but the messages are not poping up in the other field I have vard as EmailStatus i.e "Not valid E-mail address" & "e-mail recorded";


on (release)
{
if (newsletter.length < 7 || newsletter.indexOf("@&quot == -1 || newsletter.indexOf(".") == -1)
{
EmailStatus = "Not valid E-mail address";
} else
{
loadVariablesNum ("index.php", "0", "POST");
newsletter = "";
EmailStatus = "e-mail recorded";
}
}



any Ideas where im going wrong????

Nuub

[F8] Linking Email Address To Another
Okay, so I know how to make a button that opens up a user's email application with the email address already loaded and ready to send.

What I want to do, is take that email address (the email address I made up for the site I'm working on, lets say "email@working.com") and have it automatically forward to a different email address/account that the user would be unaware of.

This is possible right?

URLRequest With Email Address
I'm assembling a form that is going to be processed by someone else. They told me to change the "action" field of the form (which I'm sending via URLRequestMethod.Post) to an email address instead of the script file they were using. They said they could take the raw POST data and process it as needed.

Assuming this is true, is the syntax just:
URLRequest("name@domain.com");
or do I need to put in a "mailto" or something else because it's an email address instead of a regular URL? Or use some other function?

Thanks,

Bob

Asp Script To Email Address
Hello,

I followed the Macromedia tutorial to create a Flash MX form and send the info to an ASP page on the server. I need now to insert the ASP code into the ASP page to send the info to my email
address.

Can anybody help?

Many thanks
Magyar

Email To Certiain Address
This is what I would like to do. I have a flash movie, which will be on the internet, and I have a textbox and a "submit" button. When you type some information into the textbox and hit 'submit' flash automatically emails you the information. I want to do this because: not all people have out look, so if I use the mailto: function it wouldn't work.
Is there any way possible for flash to achieve this?


Zeka

Posting A Email Address
Hi All

I'm trying to place a simple input field and a Submit button into my flash so I can collect addresses for a newsletter but when I do a search online for an example....all I get is massive forms with loads of code I don't need. Please can anybody help me.

Email - Hide Address
How do I hide my email address from spambots using perhaps Javascript?
I want to put in a button with my email on in within my swf. which when clicked on brings up an email page (which I can do!) but then I don't know how to hide it from deviant sources. I've tried fiddling around in the html but I don't quite get it.
Please write to me like I'm truly stupid and know nothing!
cheers kath

Email Address Checker
hi! i downloaded a form from this site & edited it into a subscribe to a newsletter form. the form is working but my problem is how to make the form check whether its a legitimate email address? if its not, the submit process should not be forwarded to the receiving email inbox.

here is the code:

on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}

hope u can help me with this.

mca_2005

Email Address Grabber
I'm looking for a cut-and-paste solution or a nice tutorial on how to set up a simple email-grabbing operation using an input text field and the Push Button component.

Maybe I'm a bonehead, but this has proven to be a slightly daunting challenge.

Would it be easier to do this simply with an input field and a regular old button instead of the component?

thanks!!

Email Address Link
Hi,
I wanna put an email address link in my flash site. When someone simply clicks on the address, i just want the default software to open (e.g. outlook etc.)

Cheers

Verify Email Address - Help
Hi all,

Im trying to create a form in actiocsript that verifies correct user input before submitting. So far I have the form checking that NewEmail contains characters, an "@" symbol and a "." symbol.

However is there code that can check that the layout of the email is correct before submitting i.e. <"sometext"@"sometext"."sometext">

Also I need to insert a seperate name verifier to check that there are no numbers included in a text box.

This is my code so far:

_global.detailsCheck = function() {
if ( _root.NewEmail.length == 0 | _root.NewEmail.length == "" | _root.NewEmail eq "") {
// Alerts the user that their password is incorrect
_root.Guide2 = "Please Fill All Detail Fields";
// Stops the movie from going to the next frame
stop();
} else if (_root.NewEmail.indexOf("@") == -1) {
_root.Guide2 = "Please Give A Valid Email Address";
stop();
} else if (_root.NewEmail.indexOf(".") == -1) {
_root.Guide2 = "Please Give A Valid Email Address";
stop();
} else {
//submit details
gotoAndPlay ("ExitFrame");
}
}



Any help would be much appreciated...

Asp Script To Email Address
Hello,

I followed the Macromedia tutorial to create a Flash MX form and send the info to an ASP page on the server. I need now to insert the ASP code into the ASP page to send the info to my email
address.

Can anybody help?

Many thanks
Magyar

Email To Certiain Address
This is what I would like to do. I have a flash movie, which will be on the internet, and I have a textbox and a "submit" button. When you type some information into the textbox and hit 'submit' flash automatically emails you the information. I want to do this because: not all people have out look, so if I use the mailto: function it wouldn't work.
Is there any way possible for flash to achieve this?


Zeka

Posting A Email Address
Hi All

I'm trying to place a simple input field and a Submit button into my flash so I can collect addresses for a newsletter but when I do a search online for an example....all I get is massive forms with loads of code I don't need. Please can anybody help me.

Checking Valid Email Address
hey
i'm trying to make a sign up password movie in flash
and i need the code to check if the email address field is a valid email address

eg. bob@bob.com valid
bob@bob not valid
etc etc


thanks

Submit Form To My Email Address
hi!
can any body has a solution of my problem.

i've a form in my flash file. it has fields like 'Name', 'City', 'Country' etc.
now i want that when the user press the 'Submit' button, i recieve that form through my email. i mean how can i submit this form to my email address.

i shall be very thankful if any body can help me.

Validating Email Address Format
Hi,

I'm writing a user registration form in MX
I can't get my email validation actionscript working.

I am checking the address to be at least 6 characters long and for '@' and at least one '.'

I would also like to make sure it contains just alpha numeric characters + '-' but the first part is enough of a challenge.

Has anyone already written a email validation script
or can you help debug mine.

Thanks for looking

Form Not Showing Email Address
I am trying to do a form in flash 4 compat, and I am so close, I am using a mailgate server, the problem I have is when I send the form the recipient does not get the senders email details in there from part of the email - I hope this makes senses.

So how do I set up a form so when it is sent using mailgatesvr the recipient can see the sender email address in the from section so they can add it manually to a mailing list.

Sending Variables To An Email Address
Hi all,

What's the best way to send variables to an email address? I'm trying to avoid an email client from opening up on the host machine...

Is it possible? - or do I need to send to a backend script that then forwards on to an email address?

Thanks...

SS

Sending An Email To A Specific Address?
I need the actionscript to send an email to an address on a link, does anyone know this?

Mailto - Email Address Is A Vairable
Hi There I'm using flash MX
how do i make tyhe mailto command mailto an email addres that is with in a vairable?

the vairable is email_tx

getURL("mailto:+email_tx+"); - doesn't work but does anyone have an idea?

cheers, stu.

Submitting Email Address For Newsletter
I am looking for the simplest way in flash to have people submit email address' for my newsletter. The gui is easy just need the script.

Linking Text To An Email Address
Can someone tell me how to link text within flash so that when someone clicks on it, it will take them to a new email.

Embedding Email Address Into Text?
Am I doing something wrong? I placed the email address into the link area of the text properties box (using MX) and it won't do anything. If I put a regular URL in there it obviously works fine.

Is there something extra I need to do to have the text open outlook?

Capture Email Address In Flash
I am designing a banner ad, and at the end I want to create a text box to have visitors enter their email address and then click submit.

When they click submit, I want an email sent to both the visitor's email address and mine to let me know they entered the info.

How can I do this, or is there a file or tutorial somewhere that can help me?
I am assuming it would be like a php form (I think, right?)

Any help would be greatly appreciated.

Sending An Image To An Email Address
alright, here's the deal.

I have made a script that allows the user to draw on the stage in different colours or whatnot, and i have a little text input box to insert a name.

what i want to figure out it, is there a way to capture the image on the stage, make and send it to an email adress? so that in my inbox, i get like, a bmp/jpg/png/gif format image, as well as the name the person put into the form?

any tutorials or even pointers in the right direction would help.
cheers,
stwelin.

[F8] How Do You Create An Email Address Link
How do you create an email address link in a movie clip so that when you click on it, it opens your email app. You see them all the time in blue and underlined. I've found the get URL mailto:abc@defghi.com, but that doesn't seem to produce the same result.

Thanks,

jc

Copyright © 2005-08 www.BigResource.com, All rights reserved