Up for a challenge? Styling Components w AS

OK, here’s the code I’m using:

var oListener:Object = new Object();
oListener.onSetFocus = function(oldFocus, newFocus) {

trace("oldFocus: " + oldFocus);
trace(“newFocus: " + newFocus);
trace(“Selection.getFocus(): " + Selection.getFocus());



Clicking on any input field in my form triggers the function, as it should. The challenge is, I want to get the name of the field. What the function returns for newFocus is:


But I can’t target it correctly with “label” on there:

What I want to do is target the setStyle property, like this:

_level0.name_txt.setStyle(“backgroundColor”, “0x000000”);

Does anyone have any idea how to do this?