Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Flash 'replaceSel()' Hilfe

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe in einem Flashfilm Flash ein Textfeld eingebaut. Wenn jetzt auf einen Button geklickt wird, soll der Text, der im Textfeld mit der Maus markiert ist durch einen String ersetzt werden:

_root.txt_artikel.replaceSel("xxxxx");

Leider wird der String bei mir immer an den Anfang des Textfeldes gesetzt. Wie muss ich das machen, damit der Text nicht an den Anfang gesetzt wird, sondern die Markierung ersetzt wird?

MFG

- Oneside -

Is ja interessant. Hab das noch nie angewendet. Habs jetzt auch mal getestes und bei mir passiert das selbe.

Ich werd mich mal umhören was man da machen kann !

Also, ich hab mich mal umgehört.

Das Ding is,dass bei onRelease die Selection weg ist. man müßte also die Selection in ner globalen variable Speichern.

Die Methode sollte wenn man die überhaupt benutzt mit dem Selection-Objekt benutzt werden...

Ich hab hab noch folgenden Code bekommen:



this.onMouseUp=function() {
_root.beg=Selection.getBeginIndex();
_root.ent=Selection.getEndIndex();
}


this.bla_btn.onRelease = function(){
_root.txt=_root.txt.substring(_root.beg,_root.ent)+"Lalalalal ich bin der Ersatz"+_root.substring(_root.ent+1._root.txt.length);
};



[/php]

hoffe es hat was gebracht

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.