Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mail form within movie clip

Status
Not open for further replies.

oculus

Programmer
May 3, 2001
30
US
Hi all. I'm trying desperately to get a form working from within a movie clip nested within another movie clip. I've used several tutorial files from various sources. They all seem very straighforward, as I've gotten cgi script-based forms to work on my server before. But that was HTML, and this is Flash.

The basic problem is that I don't get anything at all from the script: no response sent to the recipient, and no errors. I've tried .cgi, .pl, and .php3 scripts (with corresponding formatting of the variables and send button actions), and none of them work. My server is configured for all three scripting languages.

Ideas? Is there something special I have to do to handle the variables if they are in a movie clip, rather than on the main timeline?

Any advice is MUCH welcome.

Thanks in advance.

Oculus.


P.S.: if it helps, I can post code segments, or reference the scripts I'm using.
 
hi again oculus

Don't know if you've checked out FAQ250-486
, but I don't see any reason why this wouldn't work if it were held within a movie-clip.

Possibly the only two things which may need amended are:

1>> the actions in frame 2 of the movie, change to:

Code:
if (
/:
Code:
sent eq "success") {
    gotoAndStop ("complete");
}

2>> the PHP3 file, change to:

Code:
<?php
mail($addressee, $subj, $mess,
     &quot;From:&quot;.$mail.&quot;\nReply-To:&quot;.$mail);
echo(&quot;
/:
Code:
sent=success&quot;);
?>

Worth a try anyway.
dave
davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
just tested the above theory, ignore the second amendment (to the PHP file), and just change the action in frame 2 of the movie. All works perfectly.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Dave:

What I've been doing is loading the variables (within the nested movie clip) into *location* (set to the instance name of the movie clip) rather than *target 0*.

ie:
loadVariables (&quot; &quot;/FadePhrase3/form&quot;, &quot;GET&quot;);

(of course, I use the actual server name)
Is this necessary, or not? Do the variables get loaded to the main timeline anyway?

I'll try it both ways. Thanks again.


Oculus.
 
Dave:

Have added the &quot;/:&quot; to the sent variable. Then I tried it both ways -- loadVariables into target (ie: movie clip), and into Level 0. The first way, I did finally notice the status line in my HTML window (Explorer 5.5), and it said &quot;Done, but with errors on the page). The second way, I got no error message on the status line, but I still never progressed to the &quot;message sent&quot; frame.

Do I have to predefine &quot;sent&quot; on the main timeline before trying to access it from within a clip, maybe?


Still working on it.


Bill.
 
hi Bill

You don't have to predefine the &quot;sent&quot; variable. The PHP3 file echoes the variable and it's value (&quot;success&quot;) directly back to the main timeline, hence the alteration from &quot;sent&quot; to &quot;/:sent&quot; in the post above within frame 2 of the contact form. Frame3 of the form contains a loop back to frame2 (which checks the main timeline for sent=success) until it detects that sent=success, upon which the mc is directed to frame 4.

If this is still giving you a headache, feel free to e-mail me the fla and I'll have a go.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
I will! (Man, I really appreciate that!) The overall fla is rather large, as it's an entire website. So let me snip it down to the essential code and I'll e-mail it as soon as possible.


Bill.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top