3 Replies Latest reply on Dec 18, 2006 10:26 AM by BMorearty

    Newbie question: access property programmatically

      Newbie question: how come this MXML works:

      <mx:Box backgroundColor="0xff0000" />

      but this ActionScript doesn't?

      import mx.core.Container;
      import mx.containers.Box;
      var myBox:Box = new Box();
      myBox. backgroundColor = 0xff0000; <-- error 1119: undefined property backgroundColor

      More generally speaking: there seem to be some properties I can set from MXML but not from AS. What am I missing?

      - Brian