This content has been marked as final. Show 7 replies
startDrag accepts a Rectangle object as it's second parameter... try swfLoaded.startDrag(false, new Rectangle(0, 0, 0, 0));
Thank-you Brian, that helped my syntax for the drag. However it is still not the behaviour that I want. The bounds locks the drag within a specific box, I need it to still drag outside of a container... but clipped, (not visible) at the dimensions of the container...
In other words when I drag my swf, I should not be able to see anything outside the box. Kind of like a mask....
Know what I mean?
Yes I think I know exactly what you mean... however I'm not completely sure how to accomplish it. You could check each time it moves to see if it is outside a certain boundary (we used to use hitTest in Flash 8/ActionScript 2 to achieve this type of feature). Investigate the MouseEvent.MOVE event and you might be able to make this work with the stageX/stageY properties of the MouseEvent.
Best of luck,
I will look into it.
Did you ever figure this out? I have the same problem. If The parent canvas has scrollbars (with the need to scroll, not just forced on) then the object i am dragging gets clipped as desired. But when there are no scrollbars, the object I am moving goes over other items on the stage.
Could this be a depth/z-order issue?
I ended up masking the hbox on creationComplete... So didn't really figure it out, but patched it :)
Ok, i'll give that a shot then.