8 Replies Latest reply on Aug 6, 2008 2:01 PM by justria

    How do you set the fontSize of a label in AS?

    Developer504 Level 1
      I am tinkering with a neat little component I found, and I added a few labels to it. In the AS code there are now four labels. I wanted to change the default font size on one of the labels, which I know how to do in mxml but I don't really understand how that translates to a component in ActionScript.

      Imitating the way height and width were set, I tried:

      label.fontSize="10";

      but this gives me an error 1119 "access to possibly undefined property fontSize through a reference with static type mx:controls.label"

      Can someone tell me how to set the font size within an AS component?

      M.