I’ve a textfield that can have different TextFormats applied to it - these formats are in a combo:
[SIZE=1][COLOR=darkred]var comboProp:Array = [{label:“Body style 1”, data:myFormat1}, {label:“Body Sytle 2”, data:myFormat2}, …etc[/COLOR][/SIZE]
The listener function needs to set the TextFormat of the field to the chosen combo value:
[SIZE=1][COLOR=darkred]field_txt.setTextFormat(ComboBox(evt.currentTarget).selectedItem.data);[/COLOR][/SIZE]
but I’m getting all sorts of errors - notably:
[SIZE=1]cannot convert “[object TextFormat]” to flash.text.TextFormat.[/SIZE]
[SIZE=1][/SIZE]
I’ve tried appending …data.getTextFormat() to the end of the above but no joy. I guess this is a simple schoolboy error but if anyone can help I’d most appreciate it!
Cheers,
Pt