In Flex each container have it's own UIComponent .
We can use dragging using this UIComponent and also set current child position of canvas.
private function dgMouseUp(event:MouseEvent):void
{
UIComponent(event.currentTarget).stopDrag();
}
private function dgMouseDown(event:MouseEvent):void
{
Canvas(can_name).setChildIndex(UIComponent(event.currentTarget),_dp.length-1);
var area:Rectangle = new Rectangle(0, 0, can_name.width - event.currentTarget.width, can_name.height - event.currentTarget.height);
UIComponent(event.currentTarget).startDrag(false, area);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment