View Full Version : Is this possible? Drag nested movie clip.
12-09-2006, 03:30 PM
Can you drag a nested movie clip outside of it's parent? I tried a quick test using startDrag() and stopDrag() and the nested clip wants to stay within the boundaries of it's parent.
I'm thinking I need to create a new movie clip with the same visual appearance on the parent, using localtoglobal() and globaltolocal() for x,y conversion and give the user the visual impression this is possible.
Is there an easier way ?
12-10-2006, 12:20 AM
The way I go about this is what you've suggested in your post.
1. onPress() attach a `ghost` clip to follow your Mouse.
2. onReleaseOutside() attach the new clip to the timeline where you want it, based on your Mouse Position.
In effect, your not really dragging the actual clip, but rather a small copy of it (just for show) and when you realaseOutside of the actual clip you attach a new clip instance to the timeline of your choice.
12-10-2006, 07:56 PM
Thanks. I assume I will go through the same process when dropping it "inside" another clip/timeline? Such as....
// CREATE ORIGINAL CLIP
// CREATE GHOST CLIP ON PRESS
// CREATE ONE MORE CLIP ON RELEASE
Thank you for your help. I'm new to the flash environment and could use your helpful tips.
12-11-2006, 12:22 AM
here is a really simple and basic example:
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.