:-/
this is the listener on the “submit” that calls the function:
submit.addEventListener(MouseEvent.CLICK, sendActions, false, 0, true);
just drag and drop the files to your ftp…
NOTE:
i had an issue before where my server didnt have php installed. If this is the case with you, those files will not work.
Mikel_26:
First of all I’m not as good with flash as most of these guys and gals but I was in the same boat as you for several days and finally found a simple solution.
For this you need two frames. Place a stop action on both frames.
I assume you already have your form on frame 1 with your input text fields with variable names and a send button. In this example I have 3 input text fields name, email, and message. Just select each input text field while holding shift so that you can select them all and convert them to a movie clip with an instance name of “form”. Make sure you have a stop action on frame
Click on the send button and add this script to it:
on (release) {
form.loadVariables(“form.php”, “POST”);
form.onData = function() {
nextFrame();
};
}
Create a new keyframe on frame 2 and design whatever you want the user to see after they have the send button. Example : Thank You
That’s it for the flash side of it. Just export the swf. Now on the PHP side…
The php code looks like this:
<?
$Name = $_POST[‘name’];
$Email = "your@email.com";
$Message = $_POST[‘message’];
$Subject = “Your Subject Here”;
$Header = “From: $Name <$Email>”;
mail($Email, $Subject, $Message, $Header);
?>
Replace "your@email.com" with your email address and
Replace “Your Subject Here” with your subject (keep the quotations).
Save this as form.php and don’t forget the .php extension
Make sure your swf and php file is in the same folder on your server and it should work.
that will never work with AS3
[QUOTE=mikel_26;2324059]Ok it didnt go “ON” i mean this is the way i did so just please correct me if i am wrong ?
on the upload site
the following file’s will be uploaded,
swf file
php file
done all the editting of codes
etc…
upload
done…
when i view the html a.k.a “website”
try the flash ?
ta dah !
no email… ?
SWT…
XD ![/QUOTE]
There are 4 files to upload to your server.
AC_RunActiveContent.js
index.html
flash_movie.swf
sendmail.php
All works perfectly[ot]that php file when left unchanged has 666 bytes total :)[/ot]