Problem with changing font size

i have two dynamic textFields that i load text set the font and the size:


[LEFT]if (myFormat.font == 'Kanuba') {
   myFormat.size =12;
  } else {
   myFormat.size = 22;
  }
  if (txtNode.attributes['font2'] == 'Kanuba') {
   myFormat2.size = 20;}[/LEFT]

my problem is that in myFormat2.size = 20; it dosent change and “stuck” on size 12
how can i solve this?