call inline function and pass in current item as the argument - Flex 3
- by wcpro
Im trying to create a loop of items like this...
for each (var btn:Object in ViewButtonData)
{
// build element
var box:HBox = new HBox();
box.styleName = "lefttab";
box.width = "100%";
box.addEventListener("rollOver", HoverTab(btn.id, 1));
box.addEventListener("rollOut", HoverTab(btn.id, 0));
// add element to list
}
I would like to pass in current HBox to the 'HoverTab' function. Is there a way to do that?