Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-15-2006, 12:41 PM   #1
sepehr
Registered User
 
Join Date: Nov 2006
Posts: 13
Default converting codes

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)

Code:
<?php
// 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)
	if(isset($_POST[$var]))
		$$var = $_POST[$var];
	else
		$$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

message:
$message
-------
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&";
?>
sepehr is offline   Reply With Quote
Old 11-15-2006, 12:55 PM   #2
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Howdy and Welcome...

What's the error message??? Can you show us???
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 11-15-2006, 01:25 PM   #3
sepehr
Registered User
 
Join Date: Nov 2006
Posts: 13
Default

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
sepehr is offline   Reply With Quote
Old 11-15-2006, 01:29 PM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

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???
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 11-15-2006, 04:26 PM   #5
sepehr
Registered User
 
Join Date: Nov 2006
Posts: 13
Default

the error is with flash i just gave the php code for more information,maybe needed
sepehr is offline   Reply With Quote
Old 11-15-2006, 04:33 PM   #6
sepehr
Registered User
 
Join Date: Nov 2006
Posts: 13
Default

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
sepehr is offline   Reply With Quote
Old 11-15-2006, 05:12 PM   #7
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

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...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 11-15-2006, 05:18 PM   #8
sepehr
Registered User
 
Join Date: Nov 2006
Posts: 13
Default

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?
sepehr is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
question on reading in color and converting to rgb Cowgirl32 ActionScript 2.0 1 03-28-2006 06:44 PM
Moving a movie clip using codes soconfused ActionScript 1.0 (and below) 1 01-17-2006 06:02 AM
ploting zip codes on image map Graphfixz ActionScript 1.0 (and below) 6 11-18-2003 05:57 PM
Ascii codes Zidane_ffs ActionScript 1.0 (and below) 3 10-06-2003 05:12 AM
help converting flash 4 code to MX eskymo ActionScript 1.0 (and below) 5 02-15-2003 09:36 PM


All times are GMT. The time now is 04:49 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.