-1

I have defined a gradient color spectrum that I would like to use to change the color of a text selection in an input textfield. This is expected to act just like the colorpicker.

Melon
  • 29
  • 1
  • 1
  • 4
  • 1
    Do you want all the symbols in textfield to be colored uniformly, or do you want to apply gradient to the text as an image? – Vesper Dec 11 '12 at 08:02
  • 1
    Did you write any code or you want we to write it for you...? – Teejay Dec 11 '12 at 08:08

1 Answers1

0

See this one Best way to get the color where a mouse was clicked in AS3 for getting the selected color.

When you have it, simply apply yourColor to the text selection with a TextFormat:

var myFormat = new TextFormat();
myFormat.color = yourColor;

yourTextField.setTextFormat(myFormat,
                            yourTextField.selectionBeginIndex,
                            yourTextField.selectionEndIndex);
Community
  • 1
  • 1
Teejay
  • 7,210
  • 10
  • 45
  • 76