Skip to main content
Participating Frequently
October 31, 2007
Question

Email scores

  • October 31, 2007
  • 5 replies
  • 495 views
Hi all... I hope someone can help me!!

I have created an Xmas invitation which has a small game in it!! Bit of a promotional thing to get people interested. The gimmick behind it is that whoever scores the highest score we will give a prize to in our xmas party!! Kinda fun.

What I want to do is one of 2 things...

1. Send a screenshot of the page as an email attachment - I can' t see any way to do this, it would be good, but I have no idea how I could do this ... If anyone knows how to do it can they PLEASE HELP??

or

2. Send an email wth the score in the subject line. This I have done, and it works fine on some PC's, however on some other pc's the subject line is blank...

For the second option all I have used is the following function:

getURL("mailto:emailaddress@domain.com?subject=High Score: "+_root.score+"&body=GOOD LUCK! To submit your high score, please click Send button from within this email window. We look forward to seeing you at the Christmas Breakfast.","_blank");

Like I said the email works on lots of PC's, however lots of PC's it will not work.

I have also encountered issues with LotusNotes, not allowing any emails to be launched from IE (or any other web browser).

If anyone can help and suggest any other methods to send a score back to an email address without using server technology that would be great!!

I am about to tear my hair clean from my head!! PLEASE HELP!!

Regards,

Duncan
This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
November 5, 2007
that's not a valid cfm file.

if you don't know cf either hire someone that does know it or start to learn a little about it.

if you want to hire someone, send me an email via my website. if you want to learn a little check the adobe help files. copy sample code that sends an email. don't try to send any of your variables until you have the email working. then start to add your form variables.
deafheadAuthor
Participating Frequently
November 6, 2007
yes I am trying to learn about it... however it is kind of hard to learn, without knowing what to study up on????

Would you be able to offer some advice of where to start looking and what I need to pick up. if not that is fine. Thank you for your help, I just assumed sending an email would be something pretty simple using flash, but apparently it isn't...

I wouild love it if you could point me in the right direction...
kglad
Community Expert
Community Expert
November 6, 2007
here's an example of a cf file i used in a project to send html formatted email:

kglad
Community Expert
Community Expert
November 2, 2007
you can just email the score. i don't know why you don't just do that.
deafheadAuthor
Participating Frequently
November 2, 2007
That was the original plan, however for some reason on different PC's the subject and body fileds won't get populated, the emails work on most PC's , but not on all!!

I am trying to use the method LoadVars:

quote:

var emailResponse:LoadVars = new LoadVars();
emailResponse.onLoad = function(success:Boolean) {
if (success) {
debug_txt.text = this.result;
trace("sucess "+sucess);
} else {
debug_txt.text = "error downloading content"
trace("error downloading content "+sucess);
}
var email:LoadVars = new LoadVars();
email.emailFrom = "user@email.com";
email.emailTo = "duncan.buchanan@totallearn.com";
email.emailSubject = "High score: "+_root.score;
email.emailBody = nameText+"'s high score is: "+_root.score;
email.sendAndLoad(" http://www.straight2theace.com/xmas/email.cfm",emailResponse,"POST");
};


I have the cfm file in the right direction, but nothing seems to be working...

any suggestions??
kglad
Community Expert
Community Expert
November 2, 2007
remove that apostrophe in nameText+"'s high score is: "+_root.score;

then retest. if that doesn't work, use a local (from your swf's html to the cfm file) path to your cfm file. if that doesn't work, make sure you have permssions set so everyone can execute your cfm file. if that doens't work, post your cfm file code here using the attach code option.
deafheadAuthor
Participating Frequently
November 1, 2007
Thanks for that... I'm looking through that file now... can you suggest any other way to gather someones score for a game??
kglad
Community Expert
Community Expert
October 31, 2007
what's the first option? emailing a screenshot in as2? if yes, check klingemann's bitmapexporter:

http://www.quasimondo.com/archives/000572.php
kglad
Community Expert
Community Expert
October 31, 2007
1. can be done but it's an advanced project in as2. it's easier in as3, but still not for a beginner.

2. using a server side script like perl or php would be more reliable. by using getURL() to send email you're relying on user's having a default email program. most do, some don't
deafheadAuthor
Participating Frequently
October 31, 2007
Thanks for that...

would you be able to explain a little bit fut=rther how I might be able to do the first option?? (taking a screenshot)... I am not a novice... i just haven't done anything serverside before....