Email Button Script (Action) For Flash 8 - Need ASAP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fortwaynemarketplace
    New Member
    • Feb 2007
    • 1

    Email Button Script (Action) For Flash 8 - Need ASAP

    Need these two scripts;

    1. (Action) script for email (outlook express or...) to come up in .swf enviroment. I have created a button (email us), need action scritps to send/recevie an email.
    .
    2. Submit form (Action) script to send infromation form out to my email from .swf enviroment.

    You may send the information to fortwaynemarket place@yahoo.com.

    Thank you.
    Regards,
  • pia
    New Member
    • Mar 2007
    • 5

    #2
    Did you get the scripts? If so, could you also share with me? I am new and need the same.
    Regards
    pia

    Comment

    • cypher
      New Member
      • Mar 2007
      • 1

      #3
      there are several ways to do this, here's one.

      from an action layer:
      <instance name>.onRelease = function () {
      getURL("mailto: who@what.xxx");
      }

      if you're writing the script in the action window with the email button selected, use this:
      on (release) {
      getURL("mailto: who@what.xxx");
      }

      To test this script, you must open the swf in a browser.
      Good luck
      cypher

      Comment

      • korsten
        New Member
        • Feb 2008
        • 2

        #4
        i did exactly what you did, changed the <instance name> to btn.
        I inserted this in the "as" layer on the first frame.

        now it looks like this.
        btn.onRelease = function(){
        getURL("mailto: cbistands@gmail .com");
        }

        Now, i press Ctrl+enter and the 'animation' starts.

        When i click on the <instance:btn > nothing happens. No errors, no nothing. The other instance works though

        <!-- btn2.onRelease = function(){
        getURL("http://www.cbistands.c om");
        }
        --> Please help...

        Comment

        • chunk1978
          New Member
          • Jan 2007
          • 224

          #5
          to do what you require, you need to set up 3 things:

          1- a form made up of Input Text boxes, etc, and assign each form item a "Var" name (not the same thing as an instance name)... you can set your Var in the Properties tab.

          2- an external PHP script.

          3- a button (in flash) directing your form variables to the PHP script.

          there is a very basic tutorial here that will teach you how to do this: Flash Email Form / PHP Tutorial

          Comment

          • korsten
            New Member
            • Feb 2008
            • 2

            #6
            Originally posted by chunk1978
            to do what you require, you need to set up 3 things:

            1- a form made up of Input Text boxes, etc, and assign each form item a "Var" name (not the same thing as an instance name)... you can set your Var in the Properties tab.

            2- an external PHP script.

            3- a button (in flash) directing your form variables to the PHP script.

            there is a very basic tutorial here that will teach you how to do this: Flash Email Form / PHP Tutorial

            I did that step by step like they said but i tried to put the AS in the buttons action, but it told me it isn't legit.
            Code:
            form.loadVariables("email.php", "POST");
            
            &
            
            onClipEvent(data){
            
               _root.nextFrame();
            
            }
            So i created a new layer "actions"
            I also created a "email.php" file (to import the code that is)

            Code:
            <?php
            $sendTo = "senocular@hotmail.com";
            $subject = "My Flash site reply";
            
            $headers = "From: " . $_POST["name"];
            $headers .= "<" . $_POST["email"] . ">\r\n";
            $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
            $headers .= "Return-Path: " . $_POST["email"];
            $message = $_POST["message"];
            Is there something i'm doing wrong? Or what am i doing wrong, please help...

            Comment

            Working...