Selection getCaretIndex [AS 2] 
Klasa: Selection
Kompatybilność: ActionScript 1.0, Flash 5+
public static getCaretIndex() : Number
Zwraca index aktualnie świecącego się punktu pozycji.
Jeśli nie wyświetla migoczący symbol karetki w polu, wtedy metoda zwraca -1. Porządek zaznaczenia bazują na zerach (więcej info na stronie klasy).
Listing
this.createTextField("pos_txt", this.getNextHighestDepth(), 50, 20, 100, 22);
this.createTextField("tresc_txt", this.getNextHighestDepth(), 50, 50, 400, 300);
tresc_txt.border = true;
tresc_txt.type = "input";
tresc_txt.wordWrap = true;
tresc_txt.multiline = true;
tresc_txt.onChanged = getCaretPos;
var keyListener:Object = new Object();
keyListener.onKeyUp = getCaretPos;
Key.addListener(keyListener);
var mouseListener:Object = new Object();
mouseListener.onMouseUp = getCaretPos;
Mouse.addListener(mouseListener);
function getCaretPos() {
pos_txt.text = Selection.getCaretIndex();
}
        	this.createTextField("tresc_txt", this.getNextHighestDepth(), 50, 50, 400, 300);
tresc_txt.border = true;
tresc_txt.type = "input";
tresc_txt.wordWrap = true;
tresc_txt.multiline = true;
tresc_txt.onChanged = getCaretPos;
var keyListener:Object = new Object();
keyListener.onKeyUp = getCaretPos;
Key.addListener(keyListener);
var mouseListener:Object = new Object();
mouseListener.onMouseUp = getCaretPos;
Mouse.addListener(mouseListener);
function getCaretPos() {
pos_txt.text = Selection.getCaretIndex();
}
Dodano przez: divix  
Ranga: Administrator serwisu Punktów: 0
Ranga: Administrator serwisu Punktów: 0
Komentarze użytkowników
:: Losowe artykuły 

:: Wymiana linków 
    
	Modowe inspiracje |
        Android Gry i Aplikacje |
        ZaplanujTransport.pl: Przeprowadzki, transport, aukcje |
        Logo dla firmy |
        Change Tires - Car Weather Forecast Reminder |
        Laminas: MVC Framework for PHP |
        IT Books Reviews and Programming: JS, JAVA, PHP, ANDROID, CSS | 
        Katalog roślin |
        Programming articles: JAVA, PHP, C++, Python, JavaScript |
        Kancelaria Adwokacka Łukasz Huszno
        
    

 
  
				

 
                             
 


 
                        
 
		 
	