Click to See Complete Forum and Search --> : How to send dynamic text?
Carolyn Davis
01-10-2002, 07:50 PM
I am currently designing greeting cards using KM and would like to make it possible for people using my greeting cards to enter their own personal text message and have their text message and my card be sent through email to the person of their choice.
How do I accomplish this?
I am not very good at writing code or actionscript, so I am looking for a way to do this with KM without having to write code or script.
Thanks
johnie
01-10-2002, 08:05 PM
The send dynamic text sends it to an ASP Script. Realistically the easiset way to do this is have a form which asks for the data and then have a CGI or ASP script write that data to a text file or email message (if you have an automailer script). Form2Flash http://www.kessels.com/Form2Flash/ can do this and is easy to use with KM and to set up.
However, if you want, it may be possible to to write a specialized E-Mail using the client's E-Mail program that would Automail a custom HTML E-Mail and a specialized SWF.
Variables however can be set from the PARAM tags so it may be possible to use Javascript to write an E-Mails contents with specialized HTML. Give me about a day or three and I'll have something for you that won't nescarily include any server side scripting. It also would have to depend on the users E-Mail Client acepting HTML Pages.
What you are asking is dificult but I think I may be able to put something together with Javascript, which wouldn't be as good as using an ASP or CGI method.
Carolyn Davis
01-10-2002, 08:11 PM
Thank you Johnie. That would be a great help.
************************************************** *
Originally posted by johnie
The send dynamic text sends it to an ASP Script. Realistically the easiset way to do this is have a form which asks for the data and then have a CGI or ASP script write that data to a text file or email message (if you have an automailer script). Form2Flash http://www.kessels.com/Form2Flash/ can do this and is easy to use with KM and to set up.
However, if you want, it may be possible to to write a specialized E-Mail using the client's E-Mail program that would Automail a custom HTML E-Mail and a specialized SWF.
Variables however can be set from the PARAM tags so it may be possible to use Javascript to write an E-Mails contents with specialized HTML. Give me about a day or three and I'll have something for you that won't nescarily include any server side scripting. It also would have to depend on the users E-Mail Client acepting HTML Pages.
What you are asking is dificult but I think I may be able to put something together with Javascript, which wouldn't be as good as using an ASP or CGI method.
johnie
01-11-2002, 01:15 AM
Okay, I found a better way than using the About: hack in IE,
The method is here http://polar-lights.com/fla/url.html
All that would be needed with this method is a form (which I have already posted) to include the modified URL as a link in a email and some modification of the files HTML that will display the SWF. I will post the HTML:
<HTML>
<HEAD>
<TITLE>url</TITLE>
</HEAD>
<BODY bgcolor="#669966" marginwidth="0" marginheight="0" border="0" topmargin="0" leftmargin="0">
<script language="JavaScript">
document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '
+'WIDTH=100% HEIGHT=100%> <PARAM NAME=movie VALUE="url.swf'+document.location.search+'">'
+'<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#669966>'
+'<EMBED src="url.swf' +document.location.search+'" '
+'quality=high bgcolor=#669966 WIDTH=100% HEIGHT=100% '
+'TYPE="application/x-shockwave-flash"></EMBED></OBJECT>')
</script>
</BODY>
</HTML>
what is still needed is to tack ?varname=value to the URL and have it E-Mail that as a Link.
johnie
01-12-2002, 12:44 AM
Okay, I have it completly figured Out and this is how you do it.
1. Create a new HTML with this code and Upload it onto your Web Server.
<HTML>
<HEAD>
<TITLE>card</TITLE>
</HEAD>
<BODY bgcolor="#669966" marginwidth="0" marginheight="0" border="0" topmargin="0" leftmargin="0">
<script language="JavaScript">
document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '
+'WIDTH=100% HEIGHT=100%> <PARAM NAME=movie VALUE="card.swf'+document.location.search+'">'
+'<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#669966>'
+'<EMBED src="card.swf' +document.location.search+'" '
+'quality=high bgcolor=#669966 WIDTH=100% HEIGHT=100% '
+'TYPE="application/x-shockwave-flash"></EMBED></OBJECT>')
</script>
</BODY>
</HTML>
You can create the HTML By either Pasting this code into a web editor or into notepad and saving eith the HTML extension.
Remember the URL that you have uploaded it to and write it down.
2. Create your Movie and place Dynamic Text Boxes where you want the editable text to be. You will want to Click the object view and rename this box to whatever you want it to be. Write down what you have named it, you will need it later. I have called my box name in the example.
3. Okay now your next step is to create the Mailto form. This can be in the same swf as your animation if want or it can be a diffrent SWF- It only matters a little bit.
4. Create your Mailto SWF form. You will want to both use Normal text and Dynamic Text Boxes in your form. Remember to rename your text boxes. Idealistically the bare min you will need is Box for the text you want to manipulate and the standard Email Address box. Remember to name your boxes.
I named my boxes name2, and mailto for the Email Box.
5. Finally you need to create a mail button. Details on this can be found here: http://www.macromedia.com/support/flash/ts/documents/email_link.htm
We are going to have to make do some creative variable conocating for this so this is a basic of the script...
On (press)
{
var uri="URL of the HTML file located on your Server remember I told you we would use that again";
"mailtext" = "mailto:"+ mailto + "?body="+ uri +"?name="+name2 + "&subject=A_message_for_you";
getURL(mailtext)
}
The example is located here: http://jsnider.0catch.com/card.html
If you want the FUN file Email me at snider.john@netzero.com
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.