- Registriert
- 16.06.08
- Beiträge
- 99
Hi zusammen,
habe folgendes Problem: ich will ein Kontaktformular in Flash ändern... klicke ich jedoch in das Textfeld und ändere die Bezeichnung geht die schöne Animation flöten !?
Wer könnte mir nun einen Tipp geben, wo ich welchen Text im Actionscript (s.u.) ändern muss, damit dieser Fading Effekt bestehen bleibt...
Freue mich über jede Hilfe!
Vielen Dank.
#include "mc_tween2.as"
Stage.scaleMode = "noscale";
import gs.dataTransfer.XMLParser;
var oAlpha = 30;
var nAlpha = 100;
var btnOn = "0xFF6600";/
var btnOut = "0x333333";
error_btn._visible=0;
title_bar._alpha = oAlpha;
name_txt.tabIndex = 1;
phone_txt.tabIndex = 2
email_txt.tabIndex = 3;
subject_txt.tabIndex = 4;
message_txt.tabIndex = 5;
error_btn.onPress=function(){
error_btn._visible=0;
error_btn.info_txt.text ="";
clear_btn._visible=1;
send_btn._visible=1;
}
function error(txt){
error_btn._visible=1;
error_btn.info_txt.text = txt;
clear_btn._visible=0;
send_btn._visible=0;
}
subject_txt.onSetFocus = function() {
if (subject_txt.text == "Subject") {
subject_txt.text = "";
subject_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
email_txt.onSetFocus = function() {
if (email_txt.text == "Email") {
email_txt.text = "";
email_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
name_txt.onSetFocus = function() {
if (name_txt.text == "Name") {
name_txt.text = "";
name_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
phone_txt.onSetFocus = function() {
if (phone_txt.text == "Phone") {
phone_txt.text = "";
phone_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
message_txt.onSetFocus = function() {
if (message_txt.text == "Message") {
message_txt.text = "";
message_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
subject_txt.onKillFocus = function() {
if (subject_txt.text == "") {
subject_txt.text = "Subject";
subject_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
email_txt.onKillFocus = function() {
if (email_txt.text == "") {
email_txt.text = "Email";
email_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
name_txt.onKillFocus = function() {
if (name_txt.text == "") {
name_txt.text = "Name";
name_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
phone_txt.onKillFocus = function() {
if (phone_txt.text == "") {
phone_txt.text = "Phone";
phone_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
message_txt.onKillFocus = function() {
if (message_txt.text == "") {
message_txt.text = "Message";
message_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
subject_txt.onChanged = email_txt.onChanged = phone_txt.onChanged = name_txt.onChanged = message_txt.onChanged=function () {
error_btn.text = "";
};
function deleteall() {
subject_txt.text = "Subject";
email_txt.text = "Email";
name_txt.text = "Name";
phone_txt.text = "Phone"
message_txt.text = "Message";
subject_case.alphaTo(nAlpha,1,"easeOutExpo");
email_case.alphaTo(nAlpha,1,"easeOutExpo");
name_case.alphaTo(nAlpha,1,"easeOutExpo");
phone_case.alphaTo(nAlpha,1,"easeOutExpo");
message_case.alphaTo(nAlpha,1,"easeOutExpo");
}
send_btn.onPress = function() {
pressBtnForm.start();
var senddata = new LoadVars();
if ((subject_txt.text == "Subject") or (phone_txt.text == "Phone") or (email_txt.text == "Email") or (name_txt.text == "Name") or (message_txt.text == "Message")) {
error("* Bitte alle Felder ausfüllen");
this.send_btn_bg.colorTo(btnOut,1,"easeOutExpo");
} else {
senddata.subject = subject_txt.text;
senddata.nume = name_txt.text;
senddata.mail = email_txt.text;
senddata.mesaj = message_txt.text;
senddata.tel = phone_txt.text;
senddata.sendAndLoad("swf/contact/mail.php", senddata, "POST");
deleteall();
error("Message Sent");
this.send_btn_bg.colorTo(btnOut,1,"easeOutExpo");
}
};
send_btn.onRollOver = function() {
this.send_btn_bg.colorTo(btnOn,1,"easeOutExpo");
};
send_btn.onRollOut = function() {
this.send_btn_bg.colorTo(btnOut,1,"easeOutExpo");
};
clear_btn.onPress = clear_btn.onReleaseOutside = function(){
pressBtnForm.start();
deleteall()
this.clear_btn_bg.colorTo(btnOut,1,"easeOutExpo");
}
clear_btn.onRollOver = function() {
this.clear_btn_bg.colorTo(btnOn,1,"easeOutExpo");
};
clear_btn.onRollOut = function() {
this.clear_btn_bg.colorTo(btnOut,1,"easeOutExpo");
};
var o_ParsedObject:Object;
XMLParser.load("swf/contact/contact.xml",onFin);
function onFin($salam, $parsedObj, $xml) {
if ($salam) {
//load xml info
o_ParsedObject = $parsedObj;
//
contact_info.htmlText = o_ParsedObject.copy[0].value;
}
}
habe folgendes Problem: ich will ein Kontaktformular in Flash ändern... klicke ich jedoch in das Textfeld und ändere die Bezeichnung geht die schöne Animation flöten !?
Wer könnte mir nun einen Tipp geben, wo ich welchen Text im Actionscript (s.u.) ändern muss, damit dieser Fading Effekt bestehen bleibt...
Freue mich über jede Hilfe!
Vielen Dank.
#include "mc_tween2.as"
Stage.scaleMode = "noscale";
import gs.dataTransfer.XMLParser;
var oAlpha = 30;
var nAlpha = 100;
var btnOn = "0xFF6600";/
var btnOut = "0x333333";
error_btn._visible=0;
title_bar._alpha = oAlpha;
name_txt.tabIndex = 1;
phone_txt.tabIndex = 2
email_txt.tabIndex = 3;
subject_txt.tabIndex = 4;
message_txt.tabIndex = 5;
error_btn.onPress=function(){
error_btn._visible=0;
error_btn.info_txt.text ="";
clear_btn._visible=1;
send_btn._visible=1;
}
function error(txt){
error_btn._visible=1;
error_btn.info_txt.text = txt;
clear_btn._visible=0;
send_btn._visible=0;
}
subject_txt.onSetFocus = function() {
if (subject_txt.text == "Subject") {
subject_txt.text = "";
subject_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
email_txt.onSetFocus = function() {
if (email_txt.text == "Email") {
email_txt.text = "";
email_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
name_txt.onSetFocus = function() {
if (name_txt.text == "Name") {
name_txt.text = "";
name_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
phone_txt.onSetFocus = function() {
if (phone_txt.text == "Phone") {
phone_txt.text = "";
phone_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
message_txt.onSetFocus = function() {
if (message_txt.text == "Message") {
message_txt.text = "";
message_case.alphaTo(oAlpha, 1, "easeOutExpo");
}
};
subject_txt.onKillFocus = function() {
if (subject_txt.text == "") {
subject_txt.text = "Subject";
subject_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
email_txt.onKillFocus = function() {
if (email_txt.text == "") {
email_txt.text = "Email";
email_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
name_txt.onKillFocus = function() {
if (name_txt.text == "") {
name_txt.text = "Name";
name_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
phone_txt.onKillFocus = function() {
if (phone_txt.text == "") {
phone_txt.text = "Phone";
phone_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
message_txt.onKillFocus = function() {
if (message_txt.text == "") {
message_txt.text = "Message";
message_case.alphaTo(nAlpha, 1, "easeOutExpo");
}
};
subject_txt.onChanged = email_txt.onChanged = phone_txt.onChanged = name_txt.onChanged = message_txt.onChanged=function () {
error_btn.text = "";
};
function deleteall() {
subject_txt.text = "Subject";
email_txt.text = "Email";
name_txt.text = "Name";
phone_txt.text = "Phone"
message_txt.text = "Message";
subject_case.alphaTo(nAlpha,1,"easeOutExpo");
email_case.alphaTo(nAlpha,1,"easeOutExpo");
name_case.alphaTo(nAlpha,1,"easeOutExpo");
phone_case.alphaTo(nAlpha,1,"easeOutExpo");
message_case.alphaTo(nAlpha,1,"easeOutExpo");
}
send_btn.onPress = function() {
pressBtnForm.start();
var senddata = new LoadVars();
if ((subject_txt.text == "Subject") or (phone_txt.text == "Phone") or (email_txt.text == "Email") or (name_txt.text == "Name") or (message_txt.text == "Message")) {
error("* Bitte alle Felder ausfüllen");
this.send_btn_bg.colorTo(btnOut,1,"easeOutExpo");
} else {
senddata.subject = subject_txt.text;
senddata.nume = name_txt.text;
senddata.mail = email_txt.text;
senddata.mesaj = message_txt.text;
senddata.tel = phone_txt.text;
senddata.sendAndLoad("swf/contact/mail.php", senddata, "POST");
deleteall();
error("Message Sent");
this.send_btn_bg.colorTo(btnOut,1,"easeOutExpo");
}
};
send_btn.onRollOver = function() {
this.send_btn_bg.colorTo(btnOn,1,"easeOutExpo");
};
send_btn.onRollOut = function() {
this.send_btn_bg.colorTo(btnOut,1,"easeOutExpo");
};
clear_btn.onPress = clear_btn.onReleaseOutside = function(){
pressBtnForm.start();
deleteall()
this.clear_btn_bg.colorTo(btnOut,1,"easeOutExpo");
}
clear_btn.onRollOver = function() {
this.clear_btn_bg.colorTo(btnOn,1,"easeOutExpo");
};
clear_btn.onRollOut = function() {
this.clear_btn_bg.colorTo(btnOut,1,"easeOutExpo");
};
var o_ParsedObject:Object;
XMLParser.load("swf/contact/contact.xml",onFin);
function onFin($salam, $parsedObj, $xml) {
if ($salam) {
//load xml info
o_ParsedObject = $parsedObj;
//
contact_info.htmlText = o_ParsedObject.copy[0].value;
}
}