Is it possible (with TLF or any other format) to set a textfield as "dropped capitals": That is, with the very first letter set big and the rest of the text set round it?
Thanks
Printable View
Is it possible (with TLF or any other format) to set a textfield as "dropped capitals": That is, with the very first letter set big and the rest of the text set round it?
Thanks
Make an Input Textfield (Classic Text, not TLF), give it an instance name of, txt, and use this code on our frame, depending on your Actionscript version:
~ ACTIONSCRIPT 2.0 ~
Actionscript Code:txt.onChanged = function(){
if(txt.text.length > 0){
txt.replaceText(0, 1, txt.text.charAt(0).toUpperCase());
}
}
~ ACTIONSCRIPT 3.0 ~
Actionscript Code:import flash.events.Event;
txt.addEventListener(Event.CHANGE, firstCapital);
function firstCapital(e:Event){
e.target.replaceText(0, 1, e.target.text.charAt(0).toUpperCase());
}
Hope this helps :)
Thanks, I was thinking something more like this:
http://www.w3.org/TR/2010/WD-xslfo20...e-initials.png
that I am not sure of, and also not sure if is possible, because that kind of formatting isn't possible in Flash, based on my experience with Classic Text, but I may be wrong, 'cause I haven't tried TLF text!
ok thanks