4 Replies Latest reply on May 27, 2009 1:38 PM by Ned Murphy

    Message box help

    hamstorg

      Hi everyone,

       

       

      First of all im new to flash , around 3 days experience.

       

       

      I have downloaded a flash from template monsters and its great but i have one issue that nobody seems to know how to resolve.

       

       

      If you go check contacts there is a message box where you can type your message , subject, and name.

       

      Under the message box are 2 buttons < CLEAR >  < SEND >

       

       

      How can i fix up these buttons to work?

       

       

      Clear should delete the message

       

      and i'd like some other way to send the message besides mailto actionscript

       

       

      Any suggestions will be considered and appreciated

       

      Thanks!!

        • 1. Re: Message box help
          kglad Adobe Community Professional & MVP

          if you don't want to use mailto to send email, you'll need to change the actionscript AND use server-side coding like php.  if that's what you want, does your server support php and what code is used now on your send button?  (and your clear button shouldn't need any changes.)

          1 person found this helpful
          • 2. Re: Message box help
            hamstorg Level 1

            Hi, thanks for answering the thread.

             

             

            Yes i want to it to be able to send a message without opening outlook(if its not installed). its painstacking and i want something thats fast

             

            and yes my host sever does support php.

             

             

            btw unfortunately the clear button nor the send button has absolutely no actionscript whatsoever.

             

            Would appreciate a tutorial link about php coding or actionscript for the clear button.

             

             

            Thanks!

            • 3. Re: Message box help
              hamstorg Level 1

              i've been researching and i've came up with something like this

               

              ----

              Action Script :
              ----

               

              on (release) {
              if (_parent.name eq "" or _parent.message eq "" or _parent.email eq "") {
              stop ();
              trace (_parent.name) //is used when testing movie
              trace (_parent.email)
              trace (_parent.message)
              } else {
              loadVariablesNum ("form.php", 0, "POST");
              _parent._parent.gotoAndStop(2);
              }
              }

               

              --------
              php code
              --------
              <?

               

              $to = "suggestions@socal-bars.com";
              $msg = "$name\\n\\n";
              $msg .= "$message\\n\\n";
              mail($to, $subject, $msg, "From: Contact Box\\nReply-To: $email\\n");

               

              ?>

              im pretty sure its similar to what i have.

              only thing is im not sure if its correct.
              • 4. Re: Message box help
                Ned Murphy Adobe Community Professional & MVP

                If the on(release) code you show is intended for your send button, what you should do first is comment out the line with the load variables, add the same traces from the upper portion of the if statement there, and just see if it traces the name, email, and message data correctly.  That will tell you if it's at least catching the information you intend to send.

                 

                For the clear button, you'd want to use another on(release) function call that resets the values of those same variables and their textfields to = ""

                 

                on(release){

                _parent.name = "";

                etc...

                }

                 

                Once you have the send function working properly, then you can uncomment the loadVAriables line and see if it gets processed by the php (load the php to the server first).

                 

                The only problem from my viewpoint at the moment is not knowing how you have things located, so some of those "_parent" calls may be out of whack.