Hi all,
I've some problem with IMenuItemRenderer, I can't get it position in
Menu, not index only X, Y coordinates. I've override it and get my
itemRenderer: MyMenuItemRenderer:
public class MyMenuItemRenderer extends UIComponent
implements
IDataRenderer, IListItemRenderer,
IMyMenuItemRenderer, IDropInListItemRenderer
{
....
public function set data(value:Object):void
{
_data = value;
invalidateProperties();
invalidateSize();
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
var _do : DisplayObject = DisplayObject(this);
var pt : Point = _do.localToGlobal(new Point(x, y));
}
}
and as you can see, I'm trying to get it global position, but get only
a Point object with X=0, Y=0 :(
I need to do it, because I want to include in menu some effect: when
then the data is setting I want to move the renderer from last
renderer in menu to the current renderer - so I can get transition effect.
Or if you've any other suggestions please comment.
Thanks,
Dmitry Gorohov,
Flex Developer