Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 09-02-2006, 18:47   #1 (permalink)
Neuer User
 
Registriert seit: Feb 2005
Beiträge: 91
setFocus & TextFormat & TextField

Hi,
also da ein paar Probleme mit meinem Textfeld:

PHP-Code:
this.name_txt_fmt = new TextFormat();
name_txt_fmt.font "Comic Sans MS";
name_txt_fmt.size 24
name_txt_fmt.bold false;
name_txt_fmt.align "left";
name_txt_fmt.color 0x000000;

this.big_book_mc.createTextField("name_txt"7546517040);
//big_book_mc.name_txt.embedFonts = true;
big_book_mc.name_txt.type "input";
big_book_mc.name_txt.text "test";
big_book_mc.name_txt.setTextFormat(name_txt_fmt);
Selection.setFocus(big_book_mc.name_txt);
Selection.setSelection(Selection.getEndIndex(), Selection.getEndIndex()); 
Dieses liegt in einem Level-Film von meinem Projekt.
Vom Hauptfilm wird die SWF in einen MC geladen und abgespielt.
Mit setFocus gelangt mein Cursor direkt ans Ende von test, so das man direkt los tippen kann.

Das Problem ist nun, wenn ich test jetzt lösche, verschwindet mit dem letzten Buchstaben auch mein TextFormat!?

Wenn ich keinen Text vorgebe, springt setFocus erst gar nicht in mein Textfeld, und wenn ich es dann von Hand anwähle habe ich wieder kein TextFormat

Woher kommt denn das? Ich hoffe es kann mir jemand helfen...
__________________
(\_/)
(O.o)
(> <) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
startupboy ist offline   Mit Zitat antworten
Alt 09-02-2006, 19:38   #2 (permalink)
vdch
 
Benutzerbild von Fietie
 
Registriert seit: Oct 2003
Ort: Krefeld
Beiträge: 316
Zitat:
Das Problem ist nun, wenn ich test jetzt lösche, verschwindet mit dem letzten Buchstaben auch mein TextFormat!?
weis doch einfach bei jeder Textänderung dein Textformat neu zu.

PHP-Code:
    big_book_mc.name_txt.onChanged = function(){
       
this.setTextFormat(name_txt_fmt);
        } 
Gruß Fiete
Fietie ist offline   Mit Zitat antworten
Alt 09-02-2006, 19:55   #3 (permalink)
Neuer User
 
Registriert seit: Feb 2005
Beiträge: 91

Danke für Deine Hilfe! Das löst das Problem...
__________________
(\_/)
(O.o)
(> <) This is Bunny. Copy Bunny into your signature to help him on his way to world domination.
startupboy 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 06:38 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele