Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

Video Corsi Actionscript 3.0


+ Reply to Thread
Results 1 to 5 of 5

Thread: Problema con textfield

  1. #1
    Junior Member Settled In neeohak is on a distinguished road
    Join Date
    Dec 2007
    Posts
    13
    Rep Power
    0

    Problema con textfield

    amazing Flash templates
    Salve,
    qualcuno può aiutarmi ?
    ho un textfield che contiene una stringa importata come testo html all'interno di uno stage.
    Il mio problema è che ho un oggetto movieclip che dovrei spostare nella posizione di una linea all'interno della stringa del textfield e nn riesco a calcolare la posizione della stringa...
    in poche parole, ce l'avete presente una sorta di debug di un compilatore ? Beh, stavo provando a fare questo... scorrere un oggetto di evidenziazione su un testo di codice secondo i parametri che gli do io.

    Qualche soluzione o idea alternativa ?

    Grazie.


  2. #2
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,460
    Rep Power
    8

    Re: Problema con textfield

    Ciao e benvenuto

    Credo ti serve questa proprietà della classe TextField:

    caretIndex

    e questi metodi:

    getCharBoundaries(charIndex:int):Rectangle

    getCharIndexAtPoint(x:Number, y:Number):int

  3. #3
    Junior Member Settled In neeohak is on a distinguished road
    Join Date
    Dec 2007
    Posts
    13
    Rep Power
    0

    Re: Problema con textfield

    Perdonami l'ingnoranza,
    non è che potresti spiegarmi a che servono e come si usano ?
    In pratica, getCharBoundaries l'ho capito, ti dovrebbe restituire le coordinate di un carattere all'indice che viene dato... quello che io nn ho è proprio l'indice.
    come si usano caretIndex e getCharIndexAtPoint ??? Come li uso per ricavare l'indice del primo carattere della mia linea di stringa ?

    Grazie.

    Quote Originally Posted by Flep View Post
    Ciao e benvenuto

    Credo ti serve questa proprietà della classe TextField:

    caretIndex

    e questi metodi:

    getCharBoundaries(charIndex:int):Rectangle

    getCharIndexAtPoint(x:Number, y:Number):int

  4. #4
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,460
    Rep Power
    8

    Re: Problema con textfield

    Ciao

    Se non hai un indice come definisci la posizione ?

  5. #5
    Junior Member Settled In neeohak is on a distinguished road
    Join Date
    Dec 2007
    Posts
    13
    Rep Power
    0

    Re: Problema con textfield

    Credo di aver risolto, anzi, ho proprio risolto :-D
    ho fatto getCharBounderies di getLineOffset e ci ho aggiunto +18 (lo spazio tra una linea e l'altra...) ed ho trovato la posizione giusta...

    ;-)

    Quote Originally Posted by Flep View Post
    Ciao

    Se non hai un indice come definisci la posizione ?

+ Reply to Thread

Similar Threads

  1. Set focus to TextField
    By venkatesh in forum Flash English
    Replies: 1
    Last Post: 14-06-08, 10:53
  2. ancora textField da selezionare
    By acca2o in forum Actionscript 3.0 base
    Replies: 3
    Last Post: 19-05-08, 19:40
  3. TextField che non mostra il testo
    By giambo in forum Actionscript 3.0 base
    Replies: 10
    Last Post: 03-05-08, 07:49
  4. textfield & c..
    By nootropic.kint in forum Flash Italiano
    Replies: 1
    Last Post: 14-11-07, 18:39
  5. Apply a TextFormat to a TextField
    By Flep in forum Tutorials
    Replies: 0
    Last Post: 07-11-07, 06:56

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO