Loss style when overriding the function 'set data' for aTileList
Hi!
In a TileList, I set the itemRenderer for a components from where I override
the function set data like in this example:
but, by doing this, I'm loosing all the built-in CSS behavior. The onMouseOver
effect the change the backgroundColor and the hand pointer. I try to set it
programmatically but without success.
An idea?
Thank you
public override function set data(value:Object):void
{
var xml:XML = new XML(value);
if(this.backgroundIconName != null &&
this.ico != null &&
this.labelText != null) {
if(xml.backgroundIconName != "") {
this.backgroundIconName.source = "assets/" + xml.backgroundIconName;
}
this.backgroundIconName.visible = (xml.backgroundIconName != "");
this.ico.source = "assets/" + xml.iconName;
this.ico.width = Number(xml.width);
this.ico.height = Number(xml.height);
this.labelText.text = resourceManager.getString('myResources',
xml.label);
}
if(xml.@available == 'false')
{
this.enabled = false;
}
}
|