Ciao a tutti belli e brutti!!![]()
Allora...
Sto cercando di creare un editor di testo..quindi ho un campo di testo di input con nome istanza "corpo" e tre pulsanti con i quali vado a formattare il mio testo [B],[U],[I].
In un frame ho messo:
-------------------------------------
onMouseUp = function () {
ini = Selection.getBeginIndex();
end = Selection.getEndIndex();
}
-------------------------------------
e per esempio al pulsante [B],ho messo:
-------------------------------------
on (press) {
if (!b) {
myTextFormat = new TextFormat();
myTextFormat.bold = true;
corpo.setNewTextFormat(ini, end, myTextFormat);
b = true;
} else {
if (myTextFormat.bold) {
myTextFormat.bold = false;
} else {
myTextFormat.bold = true;
}
corpo.setTextFormat(ini, end, myTextFormat);
}
}
-------------------------------------
tutto funziona il testo che sottolineo viene boldato.
Il problema è che non uso + un campo di testo di input ma voglio usare il componente TextArea di flash e non funziona + nulla....perchè???
Dove stà la differenza??
Ho provato a mettere "corpo.text" ma niente.
Aiutooooooooooooooooo!!!!![]()