Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 08-04-2005, 19:59   #1 (permalink)
Neuer User
 
Benutzerbild von Till
 
Registriert seit: Jun 2001
Ort: Colonia
Beiträge: 298
TextFormat() will nicht?!

Hi,
habe folgendes Problem:
zuerst erststelle ich ganz normal ein Textfeld und formatiere dies:
ActionScript:
  1. createTextField("num", 10000001, 130, 430, 100, 80);
  2. num.selectable=false;
  3. num.text="1";
  4. numFormat = new TextFormat();
  5. numFormat.font = "Georgia";
  6. numFormat.color = "0x999999";
  7. numFormat.size = 60;
  8. num.setTextFormat(numFormat);
Funktioniert auch gut.

Dann will ich dem Textfeld durch einen Buttonklick einen neuen Text zu weisen:
ActionScript:
  1. num.text="2";

und schon wird die Formatierung aufgehoben und irgendein standard angezeigt.

Habe ich da irgendwas falsch gemacht oder was vergessen?
Bitte um Hilfe.

Danke im vorraus,
Till
__________________

peace & happiness
Till ist offline   Mit Zitat antworten
Alt 08-04-2005, 22:52   #2 (permalink)
Level up
 
Benutzerbild von Alois
 
Registriert seit: Jun 2001
Ort: Bocholt
Beiträge: 4.155
für neuen Text noch:
ActionScript:
  1. num.setNewTextFormat(numFormat);
...hinzufügen.
Das scheint Dir jetzt vielleicht unpraktisch, ist aber für viele Dinge äusserst praktisch.

Gruß

Alois
__________________
-Spuckt mir auf den Stuhl, ich will im Grünen sitzen-
Alois ist offline   Mit Zitat antworten
Alt 08-04-2005, 22:55   #3 (permalink)
meistens harmlos
 
Benutzerbild von rena
 
Registriert seit: Jun 2001
Ort: Stuttgart
Beiträge: 17.643
ActionScript:
  1. num.text="2";
  2. num.setTextFormat(numFormat);
Gruß
Rena

Edit:
Bisserl zu spät.
Hi Alois.
__________________
www.rena-hermann.de

The angels have the phone box

Geändert von rena (08-04-2005 um 22:57 Uhr)
rena ist offline   Mit Zitat antworten
Alt 08-04-2005, 22:58   #4 (permalink)
Level up
 
Benutzerbild von Alois
 
Registriert seit: Jun 2001
Ort: Bocholt
Beiträge: 4.155
Hi rena
__________________
-Spuckt mir auf den Stuhl, ich will im Grünen sitzen-
Alois ist offline   Mit Zitat antworten
Alt 09-04-2005, 00:21   #5 (permalink)
Neuer User
 
Benutzerbild von Till
 
Registriert seit: Jun 2001
Ort: Colonia
Beiträge: 298
Zitat:
Zitat von Alois
Das scheint Dir jetzt vielleicht unpraktisch.
ja, stimmt. aber wenns nicht anders geht...

auf jedenfall danke euch beiden

gruß, Till
__________________

peace & happiness
Till ist offline   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 10:31 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele