Thursday, September 9th 2010, 4:59pm UTC+2
You are not logged in.
Dear visitor, welcome to Flashbattle.de - Flashforum / Webdesign Community & Developer`s Page . If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Quoted
wieso erkennt das programm deine STRING.prototype

|
|
ActionScript-Quelltext |
1 |
var l = this.length; var a = this.indexOf('@'); var p = this.lastIndexOf('.'); var e = this.indexOf(' '); var diff = l-p;
|
This post has been edited 2 times, last edit by "Chicoloco" (Jul 16th 2008, 12:16am)
Quoted
als SPAM ausgegeben

Quoted
Textfelder nicht automatisch gelöscht werden
|
|
ActionScript-Quelltext |
1 2 3 4 5 |
but_reset.onRelease = function() {
_root.email.htmlText = "eMail";
_root.betreff.htmlText = "Betreff";
_root.nachricht.htmlText = "Deine Nachricht...";
};
|
|
|
ActionScript-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
// Sonderzeichen Aktiv
System.useCodePage = true;
// Die Textfelder bekommen eine Zuweisung und der MovieClip mit der
// Fehlermeldung wird ausgeblendet
_root.onLoad = function() {
_root.email.text = "eMail";
_root.betreff.text = "Betreff";
_root.nachricht.text = "Deine Nachricht...";
};
// Das array mit den Instanznamen von unseren Textfeldern
textfeld = new Array();
textfeld[0] = "email";
textfeld[1] = "betreff";
textfeld[2] = "nachricht";
// Durchlaufe solange wie viele Elemente im array vorhanden sind
for (i=0; i<textfeld.length; i++) {
// Funktion für den Hintergrung im Textfeld
_root[textfeld[i]].onSetFocus = function() {
this.backgroundColor = 0xcccccc;
// Überprüfung, ob im Textfeld schon reingeklickt worde ist
// damit nicht beim erneuten klicken der geschriebene Text gelöscht wird
if (_root[this._name].text == "eMail" || _root[this._name].text == "Betreff" || _root[this._name].text == "Deine Nachricht...") {
_root[this._name].text = "";
//_root[this._name] = false;
}
};
// Funktion für den Hintergrung im Textfeld
_root[textfeld[i]].onKillFocus = function() {
this.backgroundColor = 0xFFFFFF;
};
}
but_reset.onRelease = function() {
_root.email.htmlText = "eMail";
_root.betreff.htmlText = "Betreff";
_root.nachricht.htmlText = "Deine Nachricht...";
};
|
This post has been edited 3 times, last edit by "M@trixguy" (Aug 6th 2009, 4:46pm)

|
|
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
var textArray:Array = [[_root.email, "eMail"], [_root.betreff, "Betreff"], [_root.nachricht, "Deine Nachricht..."]];
System.useCodepage = true;
function makeText() {
for (i=0; i<textArray.length; i++) {
textArray[i][0].backgroundColor = 0xFFFFFF;
textArray[i][0].text = textArray[i][1];
textArray[i][0].onSetFocus = function() {
this.backgroundColor = 0xCCCCCC;
if (this.text == "eMail" || this.text == "Betreff" || this.text == "Deine Nachricht...") {
this.text = "";
}
};
textArray[i][0].onKillFocus = function() {
this.backgroundColor = 0xFFFFFF;
};
}
}
but_reset.onRelease = function() {
makeText();
};
makeText();
|

