Link to home
Start Free TrialLog in
Avatar of BRX
BRX

asked on

identify text in red instead of text in black in a textarea

Hi Everybody

I have a selectable textarea with black text.
I made a engine that changes the color of the words selected in red.
Now i need to store all the text in red into a variable.
Do you know if there is a method to do this?
Avatar of negatyve
negatyve

How do you change te font color? When you select your text, push it inside an array element, for example..
Avatar of BRX

ASKER


onClipEvent(mouseUp){
      myFocus = Selection.getFocus();
      if(myFocus == "_level0.instance1.myText"){
            // Creo il formato per la selezione
            myTextFormat = new TextFormat();
            mioColore=eval("_parent._parent.colore"+_parent._parent.laSezione);
            myTextFormat.color = mioColore;
      
            inizio=selection.getBeginIndex();
            fine=selection.getEndIndex();
      
            _parent.myText.setTextFormat (inizio, fine, myTextFormat);
      }
}

I though to add this:
mySel = new Array();
mySel.push(inizio,fine);
_parent._parent.selectionArray.push(mySel);

but the problem is that the user could select the same text more times .... or can select a part of the text already selected... do you understand?

So I think that the best thing to do is to check all the text at the end and store the red one... but i don't' really know if this is possibile.


P.S. sei negative di Flash-mx.it?
se si rispondi in italiano

bye
ASKER CERTIFIED SOLUTION
Avatar of negatyve
negatyve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BRX

ASKER

Mi sembra che funzioni... ora sono cotto domattina gli do uno sguardo piu approfondito...
comunque grazie
Avatar of BRX

ASKER

Ciao Nega

sembra che il tutto funzioni... ti ringrazio

Ho un'altra semplice domanda.
Con MX non ho mai lavorato molto.
Metti che ho una timeline con un keyframe ogni dieci frame ( naturalmente con delgi stop()).
Con dei pulsanti do il gotoAndStop ("frameLabel").
Se volessi usare il metodo :

button.onRelease=function(){
  gotoAndStop ("frameLabel").
}

devo necessariamente scriverlo ogni dieci keyframe per ogni bottone??
oppure c'e' un metodo piu comodo??


P.S.
Siccome sono nuovo di questo forum... mi dici come funziona coi punti???
ora che mi hai risposto ti dovrei dare dei punti???

ciao

BRX
Avatar of BRX

ASKER

OK mi sono chiarito da solo l'idea per button.onRelease

se ti va di dirmi come funziona coi punti...

ciao
Eccomi qua. Le istruzioni su come dare i punti sono qui: http://oldlook.experts-exchange.com/help/closing.jsp

In pratica devi cliccare sul pulsante Accept del commento che ritieni abbia risposto alla tua domanda. Quindi assegni un voto, A, B o c a seconda del tipo di risposta.