Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 12-12-2005, 13:55   #1 (permalink)
Neuer User
 
Registriert seit: Jun 2002
Ort: Dorsten
Beiträge: 382
setFocus aktiviert ganzen Text

ich habe ein eigenartiges Problem:

ich aktiviere via Selection.setFocus("meinfeld") ein Textfeld. Jetzt wird aber automatisch der komplette Text im Feld ausgewählt. selbst ein unmittelbar darauffolgendes Selection.setSelection(1, 3) hat darauf keinen Einfluss. der ganze Text bleibt aktiviert. woran kann das liegen?
__________________
No reason to live but i like it this way.
timoken ist offline   Mit Zitat antworten
Alt 12-12-2005, 14:15   #2 (permalink)
Neuer User
 
Registriert seit: Jun 2002
Ort: Dorsten
Beiträge: 382
habe das problem mal isoliert und hänge die mx2004-datei an

http://www.dinkler.de/txt.fla.zip
__________________
No reason to live but i like it this way.

Geändert von timoken (12-12-2005 um 14:18 Uhr)
timoken ist offline   Mit Zitat antworten
Alt 12-12-2005, 15:09   #3 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Hallo!
PHP-Code:
on (release) {
    
mein_fmt = new TextFormat();
    
mein_fmt.font "Fett";
    eval(
_root.textfeld).setTextFormat(_root.SelStart_root.SelEndmein_fmt);
    eval(
_root.textfeld).onSetFocus = function() {
    };
    
Selection.setFocus(_root.textfeld);
    
Selection.setSelection(_root.SelStart_root.SelEnd);

Frag einfach nicht, warum das so klappt...
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 12-12-2005, 15:23   #4 (permalink)
Neuer User
 
Registriert seit: Jun 2002
Ort: Dorsten
Beiträge: 382
habe das Problem gefunden und an der Wurzel behoben. Dein Workaround hat mich auf die Idee gebracht. Danke!

Code:
	this.floatfeld.onSetFocus = function() {
		this.border = true;
		this.borderColor = this._parent._parent.textrahmen;
		if(this._parent._parent.tools==undefined){ //ABFRAGE NEU!!!
			this._parent._parent.attachMovie("tools", "tools", 10);
		}
		adjust();
	};
__________________
No reason to live but i like it this way.
timoken ist offline   Mit Zitat antworten
Alt 12-12-2005, 15:25   #5 (permalink)
Neuer User
 
Registriert seit: Jun 2002
Ort: Dorsten
Beiträge: 382
habe das Problem gefunden und an der Wurzel behoben. Dein Workaround hat mich auf die Idee gebracht. Danke!

Code:
this.floatfeld.onSetFocus = function() {
	this.border = true;
	this.borderColor = this._parent._parent.textrahmen;
	if(this._parent._parent.tools==undefined){ //ABFRAGE NEU!!!
		this._parent._parent.attachMovie("tools", "tools", 10);
	}
	adjust();
};
__________________
No reason to live but i like it this way.
timoken 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:37 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele