This content has been marked as final.
Show 3 replies
-
1. Re: TextFormat
kglad Sep 23, 2013 1:37 PM (in response to Ron Colmen)you could use one font function:
function fontF(n:Number):Void{
previewTx.removeTextField();
this.createTextField("previewTx", 5000, txX, txY, txW, txH);
previewTx.setNewTextFormat(this["csFormat"+n]);
fontInfo();
}
for(var i:Number=0;i<fontNum:i++){
this["font"+i].ivar=i;
this["font+i].onRelease=function(){
fontF(this.ivar);
}
}
// and if the only difference among your textformats is the font, you could create one textformat and change its font property in fontF and that would save a lot of repetitive code.
-
-



