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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash not passing variables on to my php mail script

Status
Not open for further replies.

krigbert

Programmer
Jun 2, 2005
95
0
0
NO
Whenever I click the "send" button, I get a blank email. I've tried changing the variables in mail.php, and it works, I've also checked for capitalization errors and such there – I think that means the trouble is somewhere in the actionscript.

I'm using actionscript 2.0 and this is the code in the frame:

Code:
subject="";
message="";

function lineAdapt() {
	message_send = message;
	while (msg_count<length(message)) {
		msg_count = msg_count+1;
		if ((substring(message_send, msg_count, 2)) eq "\r") {
			message_send = (substring(message_send, 1, msg_count-2)) add "\n" add (substring(message_send, msg_count+2, (length(message_send))-msg_count+2));
		}
	}
	message = message_send;
	delete msg_count;
	delete message_send;
}

The button has this code:

Code:
on (release) {
	
    navn=navn.split(" ").join("_")
	if (subject eq "" or messag eq "" or from eq "" or navn eq "") {
		stop();
	} else {
		lineAdapt();
		loadVariablesNum("mail.php", 0, "POST");
		nextFrame();
	}
}

On the stage there are four input boxes with the variables "from", "navn", "subject" and "message"


What have I done wrong? Explain slowly please :l

illustration and graphic design
 
I'm feeling pretty desperate here – no one knows what I can do to find out what's wrong?

illustration and graphic design
 
I don't know where you got the script from, but it is very old. Things like "add" and "eq" are Flash 4. "add" would not be understood by Flash Player 8 onwards (the current version is Flash 10 by the way :)

Kenneth Kawamoto
 
Quite right, I made the site back in the days of CS2, the movie is published with "player" set to "flash player 7" in the publish settings – doesn't that mean it should work?

Anyway, I'll have a look at that tutorial and see what I can understand, but I imagine other things could stop working if I export it as "flash player 10"

illustration and graphic design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top