Email Form With Error Checking, Please Help
Hello! I'm looking for some help creating a simple email form with error checking. I've used the one on kirupa.com (PHP version) and it works great, but just want to put in some required fields so I don't get blank emails. Any help would be greatly appreciated!
Thanks! Danny L.
www.scribblestudios.com
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 06-05-2004, 07:36 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Email Form Error Checking
Hi
I have an email form and i want to make sure that the person entering their email has used the correct email syntax . the way its set up now the perosn could enter anything in the email input bar.
Now that I am writing this I am thinking this is a server side issue...?
Any help to get me clear on this would be cool
Ponyack
Email Form With Error Checking, Please Help
Hello! I'm looking for some help creating a simple email form with error checking. I've used the one on kirupa.com (PHP version) and it works great, but just want to put in some required fields so I don't get blank emails. Any help would be greatly appreciated!
Thanks!
Danny L.
www.scribblestudios.com
Form Email Address Error Checking
Something about this line is making my ASPMail really unhappy, can you spot what it is?
* If I remove all the error checking after !Email.length and end it right there, the script runs perfectly fine.
Quote:
}
else if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail address";
}
Email Form Checking For @
This question has probably been asked and answered before, but is simply unsearchable.
Here goes.
Making a flash/PHP email form, and I want to verify that the email address entered at least has an "@" in it. I've got a function that's checking all text fields for text before allowing the email to be sent, but I just want the "email" field to verify it has a "@" in it before going through.
What's the easiest way to do this?
Thanks advance,
-BLL
PHP Mail Form Checking Valid Email?
Hello I have a working flash php mailing form but the only problem is that I put some code in there to check if the email is valid before it sends it off but it doesn't seem to work. I did a test by just putting in a as the email and that worked, sent off the email without giving an error.
ActionScript Code:
mailReceiver.onLoad = function() { if (this.response == "invalid") { mainTL.gotoAndStop(1); alert_txt.text = "Please check email address - does not appear valid." } else if (this.response == "passed") { mainTL.gotoAndStop(4); } }
Is is possible to check if its valid before it sends off or is there another method for checking valid email addresses. I used that code from thegoldenmean.com website.
Cheers,
Inept
Error Checking A Form...
I'm having problems error checking my form that I built in Flash MX... What I basically want it to do it check to see which radio button is check (phone or email) and make sure that the corresponding input box on the form doesn't have a blank entry... If it does have a blank entry, then it is to display an error message. Here's my code that I have placed on the submit button... All the help and feedback would be greatly appreciated!!!!!
Code:
on (release) {
var contact = contact_by.getValue();
if (contact == "email" && email == "") {
failed = "yes";
message = "If you want to be contacted by Email you must enter in an email address.";
gotoAndPlay(1);
}
if (contact == "phone" && phone == "") {
failed = "yes";
message = "If you want to be contacted by Phone you must enter in a phone number.";
}
if (failed != "yes") {
getURL("contact_send.php", "", "POST");
}
}
I'm new to flash actionscript and am not sure if I have everything typed correctly, but the logic is there...
Thanks in advance,
Cole ;)
Error Checking A Form.. Need Script Help.
hey,
i want to error check my form to make sure that the name, email, and message boxes are filled in. I have tried several different methods, but each has worked sporadically.
My fla is at:
http://www.mykrob.com/testFolder/mykrobDesign.zip
the movie Clip is called "contactForm"
there is a function on the top layer called goPostal() that posts the variables to and ASP page for mailing.
Can someone help me with proper scripting for error checking? I now how to make my message box display whatever i want to whow and when i want to show it, but i must be missing something.
I just want to make sure that all fields in red are filled in before the movie tries to post anything.
thanks,
-myk
Form Error Checking - Actionscript 2
Hi all, I'm in the process of scripting out an error checking function(s) to fish out incorrectly inputed text fields. For example, in a First Name text box, I want to make actionscript shoot the user to frame 2 (the 'Incorrect Format Please Try Again' frame) if they insert any numbers or symbols into that particular text box (e.g. Jason1, J4son, ]ason). All of the text boxes in the scene are drag/drop/resizes from the components window (Components/User Interface/TextInput). I feel like I did this for a class a few years ago, but I don't have many of my old work files and I can't figure out how to do this (intuition evading me on something as seemingly simple as this is almost embarrassing). Any help or links(to tutorials) would be much appreciated. Thanks guys!
~Jason
Form Error Checking.. Duplicate From MX Board.
Hey,
i originally posted this in the MX board, but think its probably geared more towards the actionscript experts...
here goes..
i want to error check my form to make sure that the name, email, and message boxes are filled in. I have tried several different methods, but each has worked sporadically.
My fla is at:
http://www.mykrob.com/testFolder/mykrobDesign.zip
the movie Clip is called "contactForm"
there is a function on the top layer called goPostal() that posts the variables to and ASP page for mailing.
Can someone help me with proper scripting for error checking? I now how to make my message box display whatever i want to whow and when i want to show it, but i must be missing something.
I just want to make sure that all fields in red are filled in before the movie tries to post anything.
thanks,
-myk
[F8] Flash 8 - Email Form: How To Get Users Specified Email In From Portion Of Email
Hey guys,
I want to add a newsletter to my new website that people can add their email addresses to. First off, I would like to have a field that the user can type his email address in, and have that field check if the email is valid (ie make sure that there is an @something.something).
Next, I would like it to send an email to my email address, with their email address in the from portion of the email (basically as if they have emailed me directly from their email). This way, it will be very easy for me to add them to my mailing list.
Thanks a ton for any help... Ive been searching for a while on how to do this, but couldn't find a way to put the users email in the from portion of the email.
Checking Email
Hi
I was wondering if it was possible to put something on a portion of my site that enabled me to check my email. A friend of mine suggested getting something with php backend to check to pop3. I understand it, but no nothing about php and need guidance. Please send a link or a tutorial enabling me to check my email. (I have a yahoo account if it helps.)
Thanks a lot,
A Good Email List Program In Php And Email Form In Flash MX
Hello guys and Girls. Does anyone know how to setup a and direct me to a good 'Email List' program maybe done in PHP where essentially people come to my flash website....click a button to 'subscribe' to my newsletter' and when they do that.....they just type in their email addy and it is sent to a data base or something . I want to be able to simply type up a new newsletter and have it sent to all my email members who are in that email list in that data base?
I dont want anything more complicated than that!
I'm just paln to have a simlpe button in Flash that they click...and a small popup appears with a small form in flash for their email address and their name.
Let me know if anyone can refer me somewhere or help me out!
Thanks...
How To Email Textbox Attributes To An Email? (Basically A Form)
Hi I have a survey where you need to fill out a few answers, then it will auto email all the answers to one certain email. I'm not sure of the code I would use to email it. Im having a lot of trouble here, basically I would have it send one big string which includes the text variables like
"Name: " + name + "
" + "Age: " + age + "
" + "What Did you Think of the game?: " + feedback
etc. etc.
How would I send that one string to an email? Thanks ahead of time
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
Checking Password And Email Field
Hi
I'm creating a form in Flash MX and I need to created a script that check if the two passwrod text intup field are the same or not, if they are the same it will go to one frame and is they don't match it will go to a diferent frame.
I need to created another script that will check if the text input field for the email has the symbol @ and .com, if this is true or false it will go to one frame or another.
Can some one tell me if this can be done on flash and if is so how can I get this to work?
Thanks
Alex
Checking For Valid Email Address
how can i check and see if someone has entered a correct email address, ie someone@someone.com, rather than just random text.
any help would be greatly appreciated.
gkc
Checking For An Error?
Hi guys,
Hopfully this will be quick and simple.
I am trying to validate a URL that is a link to an image to be loaded into flash.
Just now i have a text field that the user can input the url and a button to check that there is an image(button loads image into a new mc"geturl").
This works, but if there is a mistake or there is no image linked to the url i get an error in flash output window "error opening url http://blah blah". Howcan i turn this error into an ouput in flash instead of the ouput window.
cheers
Paul
Error Checking - Help
Hey there,
I ave a form, and want to do some error checking on it...
I want it to...
1. Check if the field is blank.
2. Check that the field is a number.
Okay, so I have the script working perfect right now for the number... using the AS as follows.
ActionScript Code:
else if (isNaN(p)) {
error = error2;
with (pError) {
gotoAndStop(5);}
with (iError) {
gotoAndStop(1);}
with (aError) {
gotoAndStop(1);}
stop();
Now my question to you is, which argument can I use to first check if the field is blank, and then display the appropriate error message (error1).
I guess I just need to know the if ( EMPTYFIELD ) {..... command, and I can do the rest!
Thanks guys,
Checking For An Error?
Hi guys,
Hopfully this will be quick and simple.
I am trying to validate a URL that is a link to an image to be loaded into flash.
Just now i have a text field that the user can input the url and a button to check that there is an image(button loads image into a new mc"geturl").
This works, but if there is a mistake or there is no image linked to the url i get an error in flash output window "error opening url http://blah blah". Howcan i turn this error into an ouput in flash instead of the ouput window.
cheers
Paul
GetURL Checking First If User Has An Email Client
Hi guys and gals, I'm working on a site where someone would be able to click on a "contact us" button and if they have outlook or eudora or thunderbird or any other default email client installed, that client would open up.
However, I also want to check if the user has a default client, and if they don't, then they get redirected to a page with contact info.
So can one make getURL do this or build an app that will check if there is a default email client installed in the first place?
Checking If EMAIL Field Contains Specific Letters
Howdy ...
I am building a small email field, but i am stuck at the verifying routine to check if the Email contains
@, .de two letter domains or .com three letter domains ...
any hints???
thanx in advance
ChromeD
Email Form Sends Out Email 3 Times?
I am using the Web Service Connector to take text input on a form and email it from the website to the intended party. However, it sends the email out three times and I can't find where the error is. When I test the movie I get the following error: "Binding between <unknown>.. and <unknown>.params.emailFrom: The endpoint of the binding does not exist." It shows this error twice. So I am guessing the problem lies with these errors, which would give me three emails total.
Any ideas? I can't find any other instances of the WSC on the site?
Thanks,
Jim
Flash Email Form -- No Content In Email
I realize that a similar question has been posted many times, but since I've been searching for an answer that works specifically for me for 2 long days, I feel I need to post.
I've created a guestbook-type form in Flash and a perl script to send the contents of that form to my own email address. Things seem to be working fine except that the email I get is blank. I don't know much about scripting outside of Flash, so I'd appreciate some help. I think my perl script is the problem, but I'm copying both scripts below.
Thanks a milion.
-------------------------------------------------------------------
My SendMail.pl script:
-------------------------------------------------------------------
#!/usr/bin/perl
print "Content-type: text/html
";
$title='New Birdie Guestbook Entry';
$to='jessica@jessicaberardi.com';
$from= 'jessica@jessicaberardi.com';
$subject='New Guestbook Entry';
$name = 'name_txt';
$address = 'address_txt';
$city = 'city_txt';
open(MAIL, "|/usr/sbin/sendmail -t");
## Mail Header
print MAIL "To: $to
";
print MAIL "From: $from
";
print MAIL "Subject: $subject
";
## Mail Body
print MAIL "New Guestbook Entry
";
close(MAIL);
print "<html><head><title>$title<
/title></head>
<body>
";
## START HTML content
print "<h1>$title</h1>
";
print "<p>A message has been sent from $from to $to";
## END HTML CONTENT
print "
</body></html>";
-------------------------------------------------------------------
My Flash code:
-------------------------------------------------------------------
stop();
function sendForm () {
my_lv = new LoadVars ();
my_lv.name = _parent.name_txt.text;
my_lv.address = _parent.address_txt.text;
my_lv.city = _parent.city_txt.text;
my_lv.state = _parent.state_txt.text;
my_lv.zip = _parent.zip_txt.text;
my_lv.phone = _parent.phone_txt.text;
my_lv.email = _parent.email_txt.text;
my_lv.message = _parent.message_txt.text;
my_lv.send ("http://www.jessicaberardi.com/test/SendMail.pl", "POST");
gotoAndStop("thankyou");
}
submit_btn.onRelease = function () {
if (name_txt.text == "" || email_txt.text == "") {
status_txt.text = "Please complete the required fields.";
} else {
status_txt.text = "";
sendForm ();
}
};
Email Form, Help To Make Email In Html
hi ive made a email form for my site. it works but i want the email that is sent to be in html so i change images and tables.
here is my php script
PHP Code:
<?php
$adminaddress = "gerard@organisedkaos.net";
$siteaddress ="http://www.atr-training.co.uk/";
$sitename = "ATR";
$date = date("m/d/Y H:i:s");
// List and load Flash vars - and convert into PHP vars.
$inputname=$_POST['inputname'];
$address1=$_POST['address1'];
$email=$_POST['email'];
$tele1=$_POST['tele1'];
$selection2=$_POST['selection2'];
$messagebox=$_POST['messagebox'];
if ($REMOTE_ADDR == ""){
$ip = "no ip";
} else {
$ip = getHostByAddr($REMOTE_ADDR);
}
mail($adminaddress,
"Message",
"Name: " . $inputname. "
".
"Address: " . $address1. "
".
"Telephone: " . $tele1. "
".
"email: " . $email. "
".
"how did you find us: " . $selection2. "
".
"------------------------------
".
"message: ". $messagebox. "
".
"
------------------------------
".
"Logged Info :
".
"Using:". $HTTP_USER_AGENT. "
".
"Hostname: ". $ip. "
".
"IP address: ". $REMOTE_ADDR. "
".
"Date/Time: ". $date. "
".
"FROM: ". $adminaddress, "From:". $email);
mail($email, "Auto-response from ATR", "Thankyou for contacting us. We will get back to you shortly. ",
"From: info@atr-training.co.uk".
"Reply-To: info@atr-training.co.uk".
"X-Mailer: PHP/" . phpversion());
?>
please help
gerard
_form Validation - Checking Valid Email Field
I am trying to validate a form for a valid email address, but this doesnt seem to work. can anyone see where I am going wrong.
Variable name is Email. If I give it an instance name of Email aswell, it stops the form from being successful, but puts the variable path in the input box when the movie loads. Shouldnt need the instance name though i know
on (release) {
if (!Email.length || Email.indexOf ("@") == -1 || Email.indexOf (".") == -1) {
gotoAndPlay("sending");
} else {
formerror = "please enter a valid email address";
}
}
thanks
LoadMovie() Error Checking
Flash actionscript seems to have a real lack of error checking hooks.
If I use loadMovie and the .swf file that I am attempting to load is not there, or the name is mis-spelled, what can I do to know that the load has failed?
Improving AS Error Checking
Is their anyway to improve Flash's error checking of actionscript?
I've noticed alot of odd things like how you can call functions that don't exist or call functions with the wrong parameters and none of these things flags an error message.
Also is their a command in actionscript that makes it so you have to declare all your variables? Something like Option Explicit in VBScript.
Thanks.
Flash's Error Checking
Is their anyway to improve Flash's error checking of actionscript? I've noticed some odd things like you can call functions that don't exist, or call functions with the wrong parametes and none of these things flags an error. Is their anyway to improve this?
Error Checking?..(I Guess?)
need help on several things... (please)
1.) work out a bug in my script.
2.) find some sort of way to check for errors..(or if there is no new images to load)
quick and dirty scenerio:
I have a movie...basically this is just a simpe "image viewer"...set up so the user just has to dump any images into
a folder..and the "movie" will just scrol/load through them.
dynamics of set-up:
A.) _root timeline varibale, (called variable), of "i=0;"
B.) button(s) (Next and Previous...code below)
C.) Ok...the logic behind all of this is as follows:
Buttons increment varibale by 1 everytime (or decreses)
it also starts movie clip (called "transition" to start playing..about a 50 frame movie clip. with a stop action
half way through.)
The tranisition clip plays the intro animation and stops...with several things going on once it stops.. it:
1.) starts the prelaoder clip playing, as it has an onClipEvent action to check for the external .jpg
(_root.variable) being loaded into the empty "container clip" on the stage
2.) has a frame action of reading the _root variable of "varibale",.. and loading that into the container clip.
My preloader has this code on it once it is visible on stage to execute:
Code:
onClipEvent (enterFrame) {
tb = math.round(_root.container.getBytesTotal()/1024);
lb = math.round(_root.container.getBytesLoaded()/1024);
if (tb>0 && lb>0) {
this.percent = math.round((lb/tb)*100);
this.gotoAndPlay(this.percent);
if (lb==tb) {
_root.transition.gotoAndPlay("out");
}
}
}
Basically the preloader (which is a 100 frame animation) checks to see what the dynamic text box says the bytes
loaded is and then puts theplay head to that frame in the preloader clip. (instance name of clip...but refered to as
"this" in the above code)
Once the loaded bytes equals total bytes (of content loaded in the container clip on _root.)....
it triggers the "transition clip" to play its outro.
A couple tings I need help with.
1.) the bug: Once an image is loaded into into the "viewer" for the first time..the preloader works fine....as
expected.. but when you go back and view an image that has been viewed once..the preloader (100 frame animation that
the playhead mathces the dymanic text box labeled "percent") just skips and goes to playing the "outro" frame label
in the "transition clip"..
How can I get it to at least play the 100 frames animation even if the image has been loaded before? I just dont
want it to be skipped..it can (and should) play at regualr speed.NOT mathing the "percent" variable..is image has
been viewed once.
2.) As of ow it works..and it functional..(minus few bugs)..the thing is that once there is no more images to
load...it just errors out...(and the varibales still increments by one..with no matching image to load)...
How can I do some "error checking" so that I can check to see if ther is no images to load in the directory?
And either just make the "Next" button disappear..or play a clip saying no more images....or BOTH!.....just some
basic checkign to see if there is/isnt an image in the directory that matches the vraible its loking to load.
I hope this made some sense... any help is appreciated. I am NOT looking to make this a HARD coding experince..just
to make it dirty and quick fix... I need to understand one step at a time!
Thanks
-whispers-
Just in case its needed:
Specifics: (just in case anyone needs to look at them!)
1.)
Code:
_root.variable = i=0;
2.) Next button code:
Code:
on (release) {
i++;
_root.variable=("images/"+ i+".jpg");
_root.transition.gotoAndPlay("in");
}
[F8] Text Error Checking.
I have this one program that takes some built-in text an compares it with some text that the user types in to see how much they've gotten wrong. It works great except for one little issue. I have both of the text split into two different arrays. The problem is for the array for the built-in text, anything that gets put into the second index (index 1) doesn't seem to get checked. If I add 2 spaces in front of the built-in array then it works or if I change it so the loops that I'm using to compare the two arrays so that instead of starting from 0 it starts from -1, it starts having problems with the first index (index 0). An example:
>>>This is a string. This is a string.
I have it where it splits the arrays at the spaces.
Notice how "is" is in the second index? Now if the user types in exactly the same thing:
>>>This is a string. This is a string.
The results will be:
>>>Built-in:is
>>>Input:is
Could someone look at my fla and figure out why it does that.
LoadVars Error Checking
The following code uses LoadVars to post a message to an asp scriot and awaits a success/fail reply from the script, this success/fail is handled by the class, but how do i show an error if the loadvars class fails to connect to the asp script, or if the asp script does not return a success/fail value within a set amount of time?
Many thanks
Code:
//create the LoadVars objects which will be used later
//one to send data...
dataSender = new LoadVars();
//and one to catch what comes back
dataReceiver = new LoadVars();
//assign properties to LoadVars object created previously
dataSender.market = "en-gb";
dataSender.msngr = _root.msngr;
dataSender.name = vname.text;
dataSender.email = vemail.text;
dataSender.fname = vname.text;
dataSender.femail = vfemail.text;
dataSender.message = vmessage.text;
dataSender.voteOption = myOption;
//callback function - how to handle what comes back
dataReceiver.onLoad = function() {
if (this.response == "fail") {
gotoAndStop('FAIL');
} else if (this.response == "success") {
_root.gotoAndStop('SUCCESS');
} }
//now send data to script
dataSender.sendAndLoad(_root.myAbsolute+"logitechGotcha.asp", dataReceiver, "POST");
stop();
Basic Error Checking?
Hi there, I have a forum input with the fields...
Name
Email
URL
Phone
I want to do some basic error checking on thee to make sure its a valid formated email (xxx@xxxx.xxx), to make sure its a valid formatted phone number... (xxx-xxx-xxxx)
and a valid URL.
Can someone help me how I would do this easily?
Thank you kindly.
Help *Form Checking*
Hi all, I'm in the process of scripting out an error checking function(s) to fish out incorrectly inputed text fields. For example, in a First Name text box, I want to make actionscript shoot the user to frame 2 (the 'Incorrect Format Please Try Again' frame) if they insert any numbers or symbols into that particular text box (e.g. Jason1, J4son, ]ason). All of the text boxes in the scene are drag/drop/resizes from the components window (Components/User Interface/TextInput). I feel like I did this for a class a few years ago, but I don't have many of my old work files and I can't figure out how to do this (intuition evading me on something as seemingly simple as this is almost embarrassing). Any help or links(to tutorials) would be much appreciated.
if (fname.text has a number or symbol in it){
___gotoAndStop(2);
___trace("Stop being a noob, Jason");
}else{
___gotoAndStop(3);
___trace("Addaboy!");
}
It should look something like this with the exception of the has a number or symbol part, that's what I'm stuck on. Thanks for any help.
Form Checking
Hi,
I'm using Flash 5, and I've created a form for users of the website to fill in, then it posts to an ASP page for emailing to me. I've set up the ASP to check that certain fields are completed, such as name, email address etc.
However, I'd prefer a sort of alert box that appears within the Flash if someone tries to press the 'send' button without filling all the parts (like you can use Javascript alerts for HTML form checking). Any help would be great!
Thanks!
Help: Form Mail (CGI-style Email Form) In Flash
Anyone have a nice .FLA file to share so I can get in and play with the AS?
I need to setup a CGI-style email submission (request info, etc) completely within the MX2004 pro environment--for a client.
I'm not completely fluent in AS2.0, but I can run with changing the fields and calls so long as the sample is not too complex.
Much appreciated.
Error Checking In Text Fields?
How do I check what has been entered into a text field?
I've tried a simple:
if textbox = "hello" }
gotoAndStop(3)
end
But nothing?
Whats going on?
Any clues?
M
Compile-time Error Checking
i vaguely remembered writing java in eclipse a while back, and being amazed at how it would compile the file i was working on every so often, and catching errors as i typed. writing AS3 in Flex, i never saw that happen, and i just kind of assumed that my memory was incorrect.
i'm porting a pretty sizeable (~15kloc) AS2 codebase to AS3, and after a day or so of runtime errors (after i got through the week or so of compile-time errors...), i noticed that almost all of them are null pointer references.
i asked my coworker how he generally avoids them -- i know i'm gonna run into many, many more null pointer errors, since AS2 didn't complain about referencing methods/properties of null/undefined objects. he said that when he writes java in eclipse, eclipse compiles the file you're working on every seven seconds, and will catch null pointer references as you type.
so my memory was right! i set off to figure out how to get Flex to do the same with AS3. after some digging, we found the auto-compile ("report problems as you type") option in the Java perspective properties, but it's conspicuously missing from the Flex perspective properties.
so, i googled around, and eventually came to understand that it's not an option because the AS3 compiler doesn't check for null pointer reference errors at compile-time, only at run-time.
this looks to be a huge pain in the ass for AS3 developers. i found this article:
http://probertson.com/articles/2005/...g-recommended/
which recommends unit testing as the solution to all your problems, which is great, but a huge pile of additional work for a project with, currently, only one dev.
i'm going to post this as a feature request
(http://www.adobe.com/cfusion/mmform/...?name=wishform , for those who don't know), but in the meantime i'm still plowing thru a huge pile of runtime null pointer reference errors, and i'm sure that (as a legacy AS2 coder) i'll continue to stumble over these for the life of this project.
in closing, this post is part rant, but it's also part cry for help -- anyone have any thoughts/strategies for how to avoid runtime null pointer reference errors? and is there even a remote possibility that someone will release a third-party AS3 compiler that supports compile-time null pointer reference checking?
thanks yall.
Checking For A 3.5 Floppy Form Cd Rom
Hi quick question. I know this is possible in Director but is it possible in flash. I am creating a CD Rom. I need the CD Rom to look for a floppy disk on loading and take the info from it to create a budget planner style form maybe in xcel. One is it possible. Two what code do I need to put into my flash movie to achieve this.
As an aside I have created a flash movie in MX. Imported it into director 8. But none of the flash functionality works. I have also tried exporting it as a flash5 .swf through MX but again same porblem. Is there a problem importing MX .swf files into Director?
Any help much appriciated.
Cheers
Form Checking: Works Once But Not Twice...
Hello,
I have a simple submit email input field. I want to check 2 things when the user click submit:
1/ that the person has entered at least an "@" symbol in the input field...
2/ that it has been sent and a variable "sent" is returned, 1 is true (this works no worries)
The problem is that it returns -1 each time (when nothing is entered) I click on submit for the return of _root.emailText.indexOf(("@") in the output window but the script below seems to send it along to "frame7" on the second click anyway...can any one see what is happening here? Why would it work once but not the second time; even though the value is still returned as -1
Thanks heaps,
SS
code:
_root.submitSlide.continueButton.onRelease = function() {
varSenderFinal = new LoadVars();
varReceiver = new LoadVars();
varSenderFinal.firstName = _root.storeFirstName;
varSenderFinal.LastName = _root.storeLastName;
varSenderFinal.Company = _root.storeCompany;
//emailText is an input field
varSenderFinal.Email = _root.emailText;
if (_root.emailText.indexOf(("@") != -1)) {
varSenderFinal.sendAndLoad("http://www.xxxxx.xx.xx/reporter.php", varReceiver, "POST");
trace(varSenderFinal);
varReceiver.onLoad = function(success) {
trace(this.Sent);
// sent returns 1 if successful
if ((this.sent == 1)&&(_root.emailText.indexOf(("@") != -1))) {
_root.gotoAndPlay("frame7");
} else {
// display error
_root.errorMessage._visible = 1;
}
};
} else {
_root.emailText = "Please enter your email address!";
}
trace(_root.emailText.indexOf("@"));
};
stop();
Checking Form Fields
I have a form i created in flash but i don't want the submit button to be enabled until the name and email are typed in the text fields. how can i have the button initially grayed out until both fields have text in them and them become active?
Checking Flash Form
Hi,
I got a flash form and a php-script which sends an e-mail.
On my send button in flash I have the following code:
Code:
on (release) {
if (name eq "" or email eq "" or comment eq "") {
gotoAndStop(3);
} else {
loadVariablesNum("form.php", 0, "POST");
gotoAndStop(2);
}
}
The first bit check that no fields are empty, and if so goes to frame 3 with an error message. If all fields are filled it sends the variables to the php-script.
This works fine for Flash Player 6 but I have some other functionality in my movie which requires FP7 and when exporting for 7 I get errors on the code above.
Any tips on how to re-write it would be appreciated
If Then On Form Checking Vars
Question about cycling through email form and checking first if email drop has been selected then moving onto if adding a country has been filled in, but I want to have drop menu checked first and then if nothing is checked then if the add country is filled in then go ahead and proceed otherwise return Alert.
country is dropdown
new**** is new country text field
Code:
if (country.selectedIndex == false) {
Selection.setFocus(country);
Alert.show("Please select your country or add country.", "Error", Alert.OK);
return false;
} else {
if (new****.text.length == true) {
}
}
Can anyone give me some hinty. thanks in advance.
MT
Checking Flash Form
Hi,
I got a flash form and a php-script which sends an e-mail.
On my send button in flash I have the following code:
Code:
on (release) {
if (name eq "" or email eq "" or comment eq "") {
gotoAndStop(3);
} else {
loadVariablesNum("form.php", 0, "POST");
gotoAndStop(2);
}
}
The first bit check that no fields are empty, and if so goes to frame 3 with an error message. If all fields are filled it sends the variables to the php-script.
This works fine for Flash Player 6 but I have some other functionality in my movie which requires FP7 and when exporting for 7 I get errors on the code above.
Any tips on how to re-write it would be appreciated
Error Checking For Existence Of Text File
If anyone has done this or has any ideas I'd appreciate any tips.
The set up: Using Flash 5; Internal training piece runs off CD without any internet connection.
Flash File is set up for multiple users to use. For new users, a text file is to be written to hard drive with user info stored as variables. For returning users, an existing text file on their hard drive is accessed to get user information. Text file will be dynamically named based on their employee ID#.
Problem: I need to set up some sort of error check in Flash so that when user logs in, Flash must check to see if the text file already exists(hence it's a returning user and read in info) or no file exists (hence a new user) and so one must be written.
I haven't figured out how to test/error check and see if the file is non-existent or not which will determine which screen to send the user to next.
If anyone has any ideas I'd really appreciate it. Thanks!!
Paul
Listboxes And Error Checking: Pls Check My Actionscript
Hi,
the goal is : there are six name text boxes ( from name1 to name6)
each of them have a listbox ( name1_listbox to name6_listbox)
If a name is entered, AND if no listbox value is chosen, then error message
if a name case is empty/ or at the end, display success message.
here the actionscript :
code:
for (n=1;n<6;n++){
name = eval('name'+n);
listbox = eval('name' + n + '_listbox');
listboxarray = listbox.getselectedItems();
trace(listboxarray);
if (name.length > 0 && listboxarray.length == 0){
message_txt.text = "events have not been chosen for" + n;
}else{
message_txt.text = "success" + n;
}
}
}
the script doesn't work.. I always get a success message.. please help
Manojo
[F8] Error Checking And IE Flash Activate Question.
My Flash 8 site works great and in firefox, when you go to the main page it is already activate, but when you go to it in IE it requires that you click once to activate the website, which is kind of a hassle for IE users, is there a tiny peice of code I can put in so they do not have to do that ?
as well, I have a form I created that has 3 specific fields I would like to have error checking. an email field that requires the @ symbol, the proprty address field requires numbers, and the phone number field requires numbers. I would prefer a tiny popup saying that the required fields are missing, so they do not have to re-enter any info.
What is the easiest way to implement that in a flash form ? You can see the flash form here : http://getfastsolutions.com/
it is on the main page. thanks for any suggestions !
Other Methods Of Data Error-checking In Relation To IE?
OK, I'm at wits end trying to baby spoonfeed this stupid browser (Internet Explorer, IE; more like Inexplicable Errors). Here's the link to what I'm trying to build:
http://www.perseeve.com/phot.html
(Right now the thumbnail animation and _alpha changes are taken out, it's just a very plain-jane put-it-on-stage method for now just so I can see exactly how the browser is loading the images.)
What I'm trying to do: Basically, if you run that link in Safari or Netscape it loads the external thumbnail images in exactly the order that I want them to load, no problems. In IE, for some reason beyond my comprehension, it loads images (after a certain number have loaded? or byte size?) in an order that I did not specify, and also loads them onto the stage WELL AFTER the Flash error-checking code I have says they're SUPPOSEDLY 100% on-stage (getBytesLoaded() == getBytesTotal() && mc._width > 0).
What I'm looking for is either:
A) A solution on how to force IE to load EVERY SINGLE IMAGE onto the stage in the order that I want and make sure it actually displays before moving on in the timeline, or
B) Another error-checking method to see if an image is successfully loaded into a blank movieClip (already tried getBytesLoaded() == getBytesTotal() and _width > 0, as seen above).
ANY HELP IS 2000% APPRECIATED. I've been banging my head against this particular wall for faaaaar too long.
Here's the functions that pertain to the loading of the thumbnails:
Frame 1:
PHP Code:
function checkLoop() {
var i = 0;
int_checkWidth = setInterval(this, "checkWidth", i+54, this["thumb"+i].jpgLoader);
};
function checkWidth(targ) {
twc.text = "totalWidthCount: "+totalWidthCount;
if(targ.getBytesLoaded() >= targ.getBytesTotal() && targ._width > 0) {
totalWidthCount++;
twc.text = "totalWidthCount: "+totalWidthCount;
i++;
if(totalWidthCount == thumbCount) {
clearInterval(int_checkWidth);
thumbsLoaded = true;
i = 0;
}
} else {
twc.text = "ERROR";
}
};
function slowFeed(targ) {
//->this["thumb"+inc].jpgLoader._opacity = 0;
this["thumb"+inc].jpgLoader._opacity = 100;
this["thumb"+inc].jpgLoader.loadMovie(targ[inc]);
inc++;
if(inc == thumbCount) {
checkLoop();
clearInterval(int_slowFeed);
}
};
function slowFeedLoop(targ) {
inc = 0;
clearInterval(int_slowFeed);
int_slowFeed = setInterval(this, "slowFeed", 5, targ);
};
Frame 2:
PHP Code:
slowFeedLoop(sec0Thumb);
//sec0Thumb is the name of the Array that holds the
//paths/names of the JPGS I want to load.
Checking Required Form Fields
I have a flash based form which has input fields for users to submit their e-mail address and web site address. Is it possible for flash to check if the submited email address is genuine when the submit button is clicked (by ensuring that "@" is included, similarly checking if a full stop has been included in the web site field). If this can be done please put up the needed actionscript. Thanks
|