This is how you restrict a component which is to be dragged to within its parents co-ordinate space. ( So that the drag does not go out of the parent ).
var moveParent:UIComponent = moveComponent.parent as UIComponent;
moveComponent.startDrag(false,new Rectangle(0,0,
moveParent.width - moveComponent.width,
moveParent.height - moveComponent.height));
No comments:
Post a Comment