- Plantillas Web
- Plantillas E-commerce
- Plantillas de CMS y Blog
- Plantillas Facebook
- Constructor Web
Dynamic SWiSH. ¿Cómo crear un formulario de contacto?
noviembre 15, 2010
En primer lugar, por favor consulte un vídeo tutorial sobre la creación del formulario de contacto en el sitio en SWiSH dinámico aquí.
Se puede descargar un archivo .ZIP con un ejemplo del formulario de contacto general en SWiSH (Contact.swi), contact.php y contact.asp aquí.
Puede copiar el script (secuencia de comandos ) de “Text_fields” sprite del siguiente ejemplo:
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:”),
);
}
El script (secuencia de comandos) para el área de botón Hit “Submit” (Someter/Enviar):
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”);
}
El script para el área de botón Hit “Clear” (Limpiar/Borrar):
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=””;
}
}