Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 02-01-2007, 14:32   #1 (permalink)
°
 
Benutzerbild von echo5-7
 
Registriert seit: Aug 2002
Ort: Baden-Baden
Beiträge: 3.962
input text feld zeigt geschriebenen text nicht an

hi,
ich erzeuge ein input text feld via AS.
diesem ordne ich ein textformat, einen onSetFocus und onKillFocus Handler, sowie einen onChanged Handler zu.

Wenn ich jetzt was in das input textfeld schreibe, zeigt er mir aber den Text nicht an....

Woran liegt das? Bin total entnervt, weil ich nicht drauf komme.

Code:
tl = this;
tl.copyTextFormat = new TextFormat();
tl.copyTextFormat.font = "meineSchriftart";
tl.copyTextFormat.color = 0x303030;
tl.copyTextFormat.size = 8;
tl.createTextField("txt", 1, 0, 0, 200, 20);
tl.txt.border = 1;
tl.txt.type = "input";
tl.txt.embedFonts = true;
tl.txt.text = "Bitte hier klicken";
tl.txt.setTextFormat(tl.copyTextFormat);
einListener = new Object();
einListener.onChanged = function (feld){
	feld.setTextFormat(tl.copyTextFormat);
	}
tl.txt.addListener (einListener);
tl.txt.onSetFocus = function() {
	this.text = "";
};
tl.txt.onKillFocus = function() {
	if (this.text == "" || this.text == " ") {
		this.text = "Hallo Welt";
	}
};
Danke für jede Hilfe
echo
__________________

LRRM | BLOG | FACEBOOK | TWITTER | G+
echo5-7 ist gerade online   Mit Zitat antworten
Alt 02-01-2007, 14:45   #2 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
PHP-Code:
tl.txt.onChanged = function (){
    
this.setTextFormat(tl.copyTextFormat);

__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary
andretti ist offline   Mit Zitat antworten
Alt 02-01-2007, 14:49   #3 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
PHP-Code:
tl this;
tl.copyTextFormat = new TextFormat();
tl.copyTextFormat.font "meineSchriftart";
tl.copyTextFormat.color 0x303030;
tl.copyTextFormat.size 8;
tl.createTextField("txt"10020020);
tl.txt.border 1;
tl.txt.type "input";
tl.txt.embedFonts true;
tl.txt.text "Bitte hier klicken";
tl.txt.setTextFormat(tl.copyTextFormat);
tl.txt.onChanged = function() {
//Wofür?
};
tl.txt.onSetFocus = function() {
    
this.text "";
    
this.setNewTextFormat(tl.copyTextFormat);//<---Das wäre eher wichtig
};
tl.txt.onKillFocus = function() {
    if (
this.text == "" || this.text == " ") {
        
this.text "Hallo Welt";
    }
}; 
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 02-01-2007, 15:10   #4 (permalink)
°
 
Benutzerbild von echo5-7
 
Registriert seit: Aug 2002
Ort: Baden-Baden
Beiträge: 3.962
tjaaaa... man muss nur wissen wo man hinlangen muss

danke euch beiden

gruß
echo
__________________

LRRM | BLOG | FACEBOOK | TWITTER | G+
echo5-7 ist gerade online   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 16:32 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele