Ask a Question related to Macromedia Flash Sitedesign, Design and Development.
-
swheller webforumsuser@macromedia.com #1
Can you use flash forms on a cd
Hi,
I want to create a form on a cd that the customer can fill in and send the information to us. Does anyone know how to get the information sent to us as an email format when the user clicks send.
Regards
Steve
swheller webforumsuser@macromedia.com Guest
-
Flash Forms Help
When using flashing forms along with tab navigation, is there a way to set which tab to be active upon loading the form? For instance I have a... -
Flash Forms
I am looking at using flash forms but if I drag a window onto the stage and then put text into it just goes behind it. Anyone got a beginners... -
Flash Forms.....
I was curious how to get a full date time in the <cfinput type="DateField"/> tag to give the time as well as the date. Is there a way to get the... -
Converting existing forms to the Flash forms
I have forms and I change all the tags on them, but they don't change to the new 'Flash forms' in CFMX 7. Any ideas on this? -
EMBEDDING FLASH MOVIES INTO FLASH FORMS
Is there a way? EMBEDDING FLASH MOVIES INTO FLASH FORMS -
Laiverd.COM #2
Re: Can you use flash forms on a cd
Obviously an internetconnection would still be required to send the data.
Other than that, it could work just te same on a cd or on a webpage. You
might want to build in a check somehow for an existing connection.
For the basics on creating an emailform using PHP, you may find the below of
interest:
[url]http://home.hccnet.nl/john.mulder/flash/tutorials/flash_php_mailform.zip[/url]
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #3
Re: Can you use flash forms on a cd
John,
Thank you very much for this. I will get straight on with trying your tutorial. I'll let you know how I gpt on.
Cheers
Steve
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #4
Re: Can you use flash forms on a cd
Okidoki; just remember that you still need an internet connection if you
want to send of cdrom. Good luck.
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #5
Re: Can you use flash forms on a cd
Just been told I can't use php on our server. Do you know of a way of creating a form in flash that uses a cgi script or creating our own html form in flash (does flash except html?)
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #6
Re: Can you use flash forms on a cd
You can still use the tutorial; the only difference is in the file u use to
send the data an give feedback to the program. So where you encounter the
sendAndLaod("whatvere.php"), call a whatever.cgi, whatever.asp Plus; Flash
waits for a feedback variable from a php file also, so you either program
that into the cgi file you want to use, or strip it out of Flash completely
(which in terms of usability may not be the best of options).
Basically you can use any cgi/perl script that is created for sending email
through a form (be it HTML or not).
If you can use cgi, maybe check this links:
[url]http://www.hotscripts.com/CGI_and_Perl/Tips_and_Tutorials/Email_Systems/index.html[/url]
[url]http://www.hotscripts.com/CGI_and_Perl/Tips_and_Tutorials/Form_Processing/index.html[/url]
[url]http://www.hotscripts.com/CGI_and_Perl/Scripts_and_Programs/Email_Systems/Autoresponders/index.html[/url]
etc.
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #7
Re: Can you use flash forms on a cd
John,
Once again thanks for the information. I have used your tutorial and set up a form. when I publish the movie I get this error message
string_fieldIsNotEmpty.as: Line 1: ';' expected

Also I have check boxes on the form. How do I get these to appear in the email.
Cheers
Steve
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #8
Re: Can you use flash forms on a cd
Hmm; can't figure out the error you have from here. If you have been
changing that code, you might wanna copy/paste it here. Is just some stupid
syntax error.
As for checkboxes; depends a little on what you want to return. Basically
you have a variable that is set if the checkbox is checked, or unset if
unchecked. Not the best of code, but something like:
if (checkbox_mc.checked){
thevariable = true
// or
thevariable = "maybe even a string"
} else {
thevariable = false;
//or
thevariable = "another string"
}
And send the value of thevariable with the sendAndLoad(). For check boxes I
tend to still use my own and not the component that is available. In the
code above: the checkbox_mc would be a two frame movieclip; first frame with
an unchecked box, second frame with a checked box. Each box is a button that
makes the playhead move back and forth between the two frames and with an
action that sets the variable 'checked'.
Hope this info helps you further. And don't forget to post the code if you
can't work ou the error message.
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #9
Re: Can you use flash forms on a cd
John,
here is the code
#include "string_fieldIsNotEmpty.as"
#include "string_stripSpaces.as"
#include "textfield_isEmail.as"
// INITIALISE THE FORM
// all fields
fieldArray = new Array(companyname_txt, fullname_txt, title_txt, phone_txt, email_txt, message_txt, system_txt);
// fields that have to be filled
mustBeFilled = new Array(fullName_txt, email_txt);
// setting the initial text for the feedback textfield
feedback_txt.text = "All Fields have to be filled in before submitting this form";
// defining colors for focused and non-focused fields
// change values as needed
focusColor = 0xFFE1E1;
nonFocusColor = 0xFFFFFF;
// some variables for error handling
errorColor = 0xFF6666;
errorText = "<u>ERROR</u><br>All fields have to be filled.<br><br>Please correct before sending.";
// make sure that fields change color on getting focus and loosing focus
for (tf=0; tf<fieldArray.length; tf++) {
// setting the background color of the inputfields by defining a handler
// for the onSetfocus and onKillFocus events that are associated with
// each textfield
fieldArray[tf].onSetFocus = function() {
this.backgroundColor = focusColor;
};
fieldArray[tf].onKillFocus = function() {
this.backgroundColor = nonFocusColor;
};
}
// Setting some form and field properties
for (tf=0; tf<fieldArray.length; tf++) {
// setting the bordercolor of the inputfields
fieldArray[tf].borderColor = 0xFFE1E1;
// make sure all fields are empty
fieldArray[tf].text = "";
// setting the tab order
fieldArray[tf].tabIndex = tf;
}
// Make sure that the first field gets the focus when we load the form
// where fieldArray[0] refers to the first element of the fieldArray array
Selection.setFocus(fieldArray[0]);
// Set scrollbar color; change values as needed
formStyle = new FStyleFormat();
formStyle.arrow = 0xFFFFFF;
formStyle.darkshadow = formStyle.highlight=formStyle.highlight3D=formStyl e.shadow=0x000000;
formStyle.face = 0xCC0000;
formStyle.scrollTrack = 0xFFE1E1;
formStyle.addListener(scroll_mc);
// Set the action for the submit button
submit_btn.onRelease = function() {
doFormCheck(mustBeFilled);
};
// Set the action for the clear button
clear_btn.onRelease = function() {
clearFields(fieldArray);
};
// Function to check the form
doFormCheck = function (whichArray) { var numErrors = 0;for (f=0; f<whichArray.length; f++) {thisField = String(whichArray[f]);if (thisField.indexOf("email") != -1) {whichArray[f].text = whichArray[f].text.stripSpaces();whichArray[f].text = whichArray[f].text.toLowerCase();if (!whichArray[f].isEmail()) {whichArray[f].backgroundColor = errorColor;numErrors++;}} else {if (!whichArray[f].text.fieldIsNotEmpty()) {whichArray[f].backgroundColor = errorColor;numErrors++;}}}if (numErrors == 0) {sendForm();} else {giveFeedback(errorText, 0);}};
// Function to actually send the form
sendForm = function () { dataSender = new LoadVars();dataSender.companyname = companyname;dataSender.fullname = fullname;dataSender.title = title;dataSender.phone = phone;dataSender.email = email;dataSender.message = message;dataSender.system = system;dataReceiver = new LoadVars();dataReceiver.onLoad = function() {giveFeedback(dataReceiver.mailResult, 1);};dataSender.sendAndLoad("http://www.yourserver.com/directory/domail.php", dataReceiver, "GET");};
// Feedback on sending/error status
function giveFeedback(feedbackMessage, clearField) {
feedback_txt.htmlText = feedbackMessage;
// clearfields on successful sent
if (clearField) {
clearFields(fieldArray);
}
}
// Function for clearing fields
clearFields = function (whichArray) { for (i=0; i<whichArray.length; i++) {whichArray.text = "";whichArray.backgroundColor = 0xFFFFFF;}};
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #10
Re: Can you use flash forms on a cd
Copy pasted the code you gave and it does not give me an error. The only
option left as far as I can see, is that you made some mistake while
changing the file 'string_fieldIsNotEmpty.as'. If you changed that one; copy
paste here. We have to sort this out ;-)
Did you understand what I said about the checkbox thing?
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #11
Re: Can you use flash forms on a cd
John,
I havn't changed that file. Here is what I have done. I have created a flash file called mailform.fla and copied the 3 .as files into the same folder and have not changed them. I have created all the form fields and then click publish. When I click publish(I'm using flash mx) I get this error message:-
H:\marketing\conferences\travel technology show\Sell-It CD\string_fieldIsNotEmpty.as: Line 1: ';' expected

When I preview the mailform swf file I can see the form but the feedback text does not show and the buttons do not work.
If I open your original mailform_mx.swf file it previews fine but when I open your mailform_mx.fla file and then click publish, I get the same error message
H:\marketing\conferences\travel technology show\Sell-It CD\form\files\string_fieldIsNotEmpty.as: Line 1: ';' expected

I am just testing this locally at the moment and havn't put the cgi script on the server or defined it in the action script. Just testing it visually. Would this cause this. Is it looking for a particular file?
Havn't looked at the radio button code you sent me yet.
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #12
Re: Can you use flash forms on a cd
It's the ' ' part of the error message that strikes me; never seen it
before, and I am still unable to reproduce the error. Hmm; maybe you can zip
and upload the fla file and the three as files, and I'll have a look. This
is a compile error, and does not have to do with the cgi-script being
present or not.
As far as the buttons are concerned; a compile error would generally stop
the swf from working. My guess is if we can solve the compile error, we will
have solved that too ;-) And for the feedback; if you mean, the initial
text, that would be solved also.
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #13
Re: Can you use flash forms on a cd
John,
Please find files attached. Thanks for taking the time to look at this.
I havn't put in the code the radio boxes yet.
Cheers
Steve
[url]http://webforums.macromedia.com/attachments/asfiles.zip[/url]
[url]http://webforums.macromedia.com/attachments/mailform.zip[/url]
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #14
Re: Can you use flash forms on a cd
Darn; this is really stupid. It's getting darker by the minute. Even using
your files, I cannot reproduce the error; and I cannot see any mistakes in
the code. But here's some suggestions on how to proceed:
- you're using Flash MX right? Did you ever install the updated players that
were released? If not; try it; they can be found at:
[url]http://www.macromedia.com/support/flash/previous_downloads.html[/url]
- turn of 'compress movie' in the publish settings
- What happens if you do a preview in the browser? Buttons still not
working?
What platform are you on anyway? Maybe it's a platform issue? Like I said; I
haven't seen or heard this error from anyone using the tutorial. My thinking
is turning twoards it being a platform issue. I'm on WINXP Pro with FlashMX
2004 Pro here. Me using MX2004 and you MX could maybe account for the fact
that you are able to reproduce an error which I can't. Although that would
very much surprise me.
Anyway: I ran the files through flash and uploaded them again (obviously I
don't have you're fonts installed, so you have to set them back)
[url]http://home.hccnet.nl/john.mulder/flash/temp/mail%20shweller.zip[/url]
Maybe through sheer luck it will work now ;-)
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
swheller webforumsuser@macromedia.com #15
Re: Can you use flash forms on a cd
John,
Once again, thanks for taking a look at this. It is getting very frustrating.
I am running windows 2000 professional
Flash MX
I tried the following:-
Switched off compress movie - Came up with the same error message
Updated the flash files - Came up with the same error
Previewed in browser - Came up with same error
error message: H:\marketing\conferences\travel technology show\Sell-It CD\string_fieldIsNotEmpty.as: Line 1: ';' expected

I opened the SWF file you sent me and that looks fine. So I opened thte mailform.fla file you sent me back and published it and came up with the same error. I am at a loss.
Any ideas?
Cheers
Steve
swheller webforumsuser@macromedia.com Guest
-
Laiverd.COM #16
Re: Can you use flash forms on a cd
Think we might need some help from others here, cause I'm at a loss also,
and I cannot check with FlashMX. Maybe it's a good idea to start a new
thread on the errormessage and specifically the ' ' part which I have
never seen before. Also look specifically for people running MX on Windows
2000. Let them test the files (which you upload) and see what comes up.
Maybe it's platform specific. One last thing you might try is stripping all
comment (especially the large part at the top) out of the as files and see
if it solves anything.
I will keep an eye on this, and any new thread on the subject. Sorry can't
help you further right now ;-(
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest
-
Laiverd.COM #17
Re: Can you use flash forms on a cd
In addition: I'm having trouble finding the exact line that causes the
error. If we can find that, we might be able to code things differently and
work around it.
John
--
----------------------------------------------------------------------------
-----------
RESOURCES
[url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
----------------------------------------------------------------------------
-----------
TUTORIALS at
[url]www.laiverd.com[/url]
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------
Laiverd.COM Guest



Reply With Quote

