If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Dynamic SWiSH. How to create a contact form

First of all, please check a video tutorial on how to create a contact form in Dynamic SWiSH site here.

A .ZIP file with an example of a general contact form in SWiSH (Contact.swi), contact.php and contact.asp you can download here.

The script for “Text_fields” sprite you can copy from the example below:

 
onLoad(){
   
   recipient=_root.mail;
    _root.serv=”php”;
   _parent.fields_descriptions= Array (“”,
    Array(“t1”, “your_name”, “Your Name:”),
    Array(“t2”, “your_email”, “Your Email:”),
    Array(“t3”, “telephone”, “Telephone:”),
    Array(“t4”, “message”, “Message:”),
    Array(“t5”, “address”, “Your Address:”),
    Array(“t6”, “123”, “Your wegweg:”),

);   
}
 

The script for Hit area of “Submit” button:

 
on (rollOver) {
    this.gotoAndPlay(“s1”);
}
on (releaseOutside, rollOut) {
    this.gotoAndPlay(“s2”);
}
on (release) {
      
       for (i=1; i<_parent._parent.fields_descriptions.length; i++) {
           if (_parent[_parent._parent.fields_descriptions[i][0]].text!=””)  {
           this[_parent._parent.fields_descriptions[i][1]]=_parent[_parent._parent.fields_descriptions[i][0]].text+”&777&”+_parent._parent.fields_descriptions[i][2];
           }
        }
      this.recipient=_parent.recipient;
   
     
    getURL(“contact.”+_root.serv, “_blank”, “POST”);
  
    
}
 

The script for Hit area of “Clear” button:

 
on (rollOver){
    gotoAndPlay(“s1”);
}
on (rollOut){
    gotoAndPlay(“s2”);
}
on (release) {
     for (i=1; i<_parent._parent.fields_descriptions.length; i++) {
          _parent[_parent._parent.fields_descriptions[i][0]].text=””;
        }
}
 
 
Live Chat
We help you to choose the right product.
Start chat