View Full Version : converting codes

11-15-2006, 12:41 PM
on (release) {
data.email = email;
data.name = name;
data.message = message;
data.recip = recip;
data.exist = exist;
data.loadVariables('sendmail.php', 'POST');
_parent.status = 'sending now ...';

i have this code that is for flash 5 and i have to sxport my movie using flash player 8 so it creates error when exporting i wonder if somebody can convert this flash5 code to flash8 pro

ps:do i have to update sendmail.php codes? i don't know much about php
ignore lines starting with // (comments)

// list all vars to be expected from the movie
$vars = array("name", "email", "message", "recip", "exist");
// and import them into the script
foreach($vars as $var)
$$var = $_POST[$var];
$$var = '';

// check variables
//if(strlen($name) < 3)
// die("&status=please enter a real name&");
//if(!eregi('^([a-z0-9\._-])+@([^\.]+\.[^\.]+)', $email, $matched))
// die("&status=please enter a correct email address&");
//else if(!getmxrr($matched[2], $mxrr))
// die("&status=your mail server does not seem to exist&");

// where to send it
// remove or configure one of the two code blocks
// otherwise your mail will be sent to [email protected] :)

//**** this one for the selectable recipients ****
//$recips = array("support" => "[email protected]", "account" => "[email protected]");
//$recip = $recips[$recip];
// if something went wrong, send to default address
//if(empty($recip)) $recip = "[email protected]";
// ***** end selectable recipient ********

// ***** or one fixed recipient ******
$recip = "[email protected]";
//**** end fixed recipient *******

// build up message
// this code for any multiline text fields
$message = str_replace("\r", "\n", $message);
// info vars
$sender = $_SERVER[REMOTE_ADDR];
// you can rearrange this - just do not add or remove quotes
$mailbody = "Contact form sent by
Name: $name
Email: $email
//Existing customer? $exist

sender's ip: $sender";

// send it off
// note - if you omit the last part, a few servers do not send mail at all,
// but most would show strange senders like [email protected]
mail($recip, "contact form", $mailbody, "From: [email protected]");

// and tell visitor
print "&status=mail sent - we will be in touch with you shortly&";

11-15-2006, 12:55 PM
Howdy and Welcome... :)

What's the error message??? Can you show us???

11-15-2006, 01:25 PM
sorry for testing and giving u the exact error i need my php file running at the server but it's down at the time

but as far as i remember flash points to lines containing these codes lines that these are for flash 5!
isn't that true? can i use this is flash 8 pro?

ps: Thanks FOr sayin Welcome :cool:

11-15-2006, 01:29 PM
I think what you have is still valid in Flash 8...

I am abit confused... Do you get an error message because of ActionScript or PHP???

11-15-2006, 04:26 PM
the error is with flash i just gave the php code for more information,maybe needed

11-15-2006, 04:33 PM
hey guys i solved the problem :) sorry for bothering:)
but i have another question can i switch between languages?
i mean to make button that does the work of alt+shift button

thanks before

11-15-2006, 05:12 PM
Glad to hear that you solved the problem... It'd be great to show us the solution if you solved the problem so that somebody who search the forum could learn from what you have found out...

Also, please post a new thread if you have different problem than your original question...

11-15-2006, 05:18 PM
ok, i just changed the flash player version in the publish settings
Note:the first time i did it ,it didn't workout but the next time It did work
and from now on i will send new stuff within new thereads,btw don't u know how can i switch the language?