-
Drag Menu
I've got a menu that pops out from an icon; But i also want this icon to be draggable. But the thing is, when it is dragged, as soon as the user releases the button, the "on (release)" event is launched! I want the user to be able to drag it without the menu popping out as soon as he releases it. Hmmm...It's not clear...How to put it?
...Ok
1) There's an icon
2) the user drags it...And release the mouse button
3) the menu pops out
What I want is:
1) There's an icon
2') the user drags it, releases it where he wants
OR
2") The user clicks it and the menu pops out
3) The menu is popped out and he can still drag it.
Is there any way to do that? Any help would be appreciated
-
One way is to turn that icon into a movie clip. As long as it is part of the menu movie clip, you can add drag code to it and the rest of the movie will drag along with it when it's moved. It won't work if you also have code on it to make the thing pop out. In that case, make a small mc with the word drag in it and set the code on that.
_root.menu.icon.onPress = function() {
startDrag("");
};
_root.menu.icon.onRelease = function() {
stopDrag();
};
-
Thanks
Yup, that's what I ended up doing