--- In [email protected], shaun <[EMAIL PROTECTED]> wrote: > > Amy wrote: > > I have a TileList that has XML as its dataProvider and is using my > > custom itemrenderer to display the data. The itemrenderer has 5 > > buttons, labeled A, B, C, D, and E. These buttons are intended to > > look like the old ScanTron sheets, or like an SAT or ACT answer sheet. > > > > So I need to be able to change one of the buttons at runtime to > > appear black if the student has selected the answer before, or set it > > black when the student clicks it. I have a style set up, > > selectedBtn, which simply sets fillColors to #000000, #000000. If I > > set the styleName in a button's XML tag to selectedBtn, the button > > will appear dark (though not black--that is a problem for another > > day). > > > > However, if I use a.stylename = "selectedBtn", I get > > > > TypeError: Error #1009: Cannot access a property or method of a null > > object reference. > > at > > Does anyone have any idea what I could be doing wrong? > > > > 'A' is not the same as 'a'. Maybe thats the problem. > It might be better to give your components more meaningfull ids aswell. > answerButtonA for example. > As far as the color goes you might need to set the backgroundAlpha of > the button or something like that, to make it a solid color.
A is the label, whereas a is the ID. The code hinting works, so I have no reason to suspect I've gotten that bit wrong.

