In one version of mine i did add code to TOC.itemrender - in the createchildern function i think.
But in another version I setup a listener on the Show of a layer. This might work best for you since you want to take action when a layer is checked (made visible). You can set the listener for just the layers you want.
The code for this is layerlist.addEventListener(FlexEvent.SHOW, mapLayerAddHandler2, false, 0, true); where mapLayerAddHandler2 is your function.
I wanted my procedure to run whenever any layer, except basemaps, were made visible.
In one version of mine i did add code to TOC.itemrender - in the createchildern function i think.
But in another version I setup a listener on the Show of a layer. This might work best for you since you want to take action when a layer is checked (made visible). You can set the listener for just the layers you want.
The code for this is layerlist.addEventListener(FlexEvent.SHOW, mapLayerAddHandler2, false, 0, true); where mapLayerAddHandler2 is your function.
I wanted my procedure to run whenever any layer, except basemaps, were made visible.