Download

Flash dunno what variable type to set

So i’ve got this my own list item renderer

import gfx.controls.ListItemRenderer;
import gfx.controls.UILoader;

class gfx.controls.GOTAMP2ListItemRenderer extends ListItemRenderer
{
public var textField:TextField;
public var imageLoader:UILoader;
public var itemicons:itemicons;

public function GOTAMP2ListItemRenderer()
{
super();
}

public function setData(data:Object):Void
{
this.data = data;

textField.text = data ? data.label : "";
imageLoader.source = data ? data.iconimage : "";

itemicons.gotoAndStop(5);
}

private function updateAfterStateChange():Void
{
textField.text = data ? data.label : “”;
imageLoader.source = data ? data.iconimage : “”;
itemicons.gotoAndStop(5);
}
}

Problem is ItemIcons i don’t know what variable type to set if object if textfield i dunno what variable type to set. it’s basically a GFxObject with images on it.

I did a little hack I made it be a text field instead of a object and works just fine :slight_smile: