I thought this might work --- fine until I start scrolling when it gets totally out of wack. The trace does fire occasionally while scrolling but not consistently. Appreciate some hints. TIA,
Mic.
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off">
<mx:Script>
<![CDATA[
private function labelComplete():void{
trace("Here");
if(label1.text.substr(0,1) == "*"){
this.setStyle("backgroundColor", 0xe8e8e3);
}else{
this.setStyle("backgroundColor", 0xFFFFFF);
}
}
]]>
</mx:Script>
<mx:Label id="label1" text="{data.cmplx_nm}" creationComplete="labelComplete()" />
</mx:VBox>