Normally, I make sure the mask and the object have the same parent and the parent gets dragged. Wrap everything in another UIComponent.
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Sent: Thursday, November 20, 2008 12:35 PM To: [email protected] Subject: [flexcoders] dragging an object with a mask I have a UIComponent("snowGlobe") with a mask applied. Using the UIComponent I drew a circle and added it to the application. I then applied a circular Sprite mask("msk"). This works perfectly. Now whenever an object is moved outside of the UIComponent it is not displayed(ie. snow in a snowglobe). I run into trouble when I try to drag the UIComponent. When I do this, the UIComponent, and its children, drag, but the Sprite I have set as a mask does not. If I call .startDrag() on the mask at the same time I do on the UIComponent, it doesn't allow me to drag anymore. I have tried things like this.. BindingUtils.bindProperty(msk,'x',snowGlobe,'x'); BindingUtils.bindProperty(msk,'y',snowGlobe,'y'); but that doesn't seem to do anything. Can anyone help me out with being able to drag a UIComponent and its mask at the same time? I thought I should be able to remove and reapply the mask as the component is dragging, but I'm not sure where to do that at, or how to get the x and y values of the component being dragged. Any insight is greatly appreciated. Thank you!

