onClipEvent (mouseDown) {
//hittest for collision with mousedown
//_xmouse and _ymouse to follow your cursor
//true for determining whether to do it or not
if (this.hitTest(_root._xmouse,_root._ymouse,
true)) {
startDrag(this);
}
}
onClipEvent (mouseUp) {
//for when you release it saying to not follow the cursor
stopDrag();
}
//also works in earlier version's of flash.
Drag and drop code (for a puzzle) [Flash][Actionscript]
Started by: Plague | Replies: 8 | Views: 2,417
May 14, 2007 4:34 AM #32721
Well, here is an ActionScript snippet for dragging and droping thing's,
ninjapanda
Posts: 0
Joined: May 2026
Posts: 0
Joined: May 2026
May 21, 2007 12:36 AM #33438
cool. Thx for the tut man! I've been wondering how to do that for a while! :)
May 21, 2007 1:06 AM #33442
Give a man a fish, he eats for a day. Teach a man a fish, he eats for a week. It's obvious you copied and pasted this code here.
May 21, 2007 1:27 AM #33443
Quote from '.:[DA:.;840304']Give a man a fish, he eats for a day. Teach a man a fish, he eats for a week. It's obvious you copied and pasted this code here.
What the hell is wrong with you! Just because it works and looks like other codes doesn't mean it's C&P, it's just the right way to do it!
koose14
Posts: 0
Joined: May 2026
Posts: 0
Joined: May 2026
May 21, 2007 1:37 AM #33444
Hey, .:[DA]:., isnt it give a man a fish he eats for a day, teach a man to fish he eats for his life?
May 21, 2007 1:58 AM #33447
Its simple actionscript.
And this type of "tutorial" has been made thousands of times.
Seriously, explain about the code instead of just pasting it.
And this type of "tutorial" has been made thousands of times.
Seriously, explain about the code instead of just pasting it.
May 21, 2007 2:36 AM #33451
Quote from applesIts simple actionscript.
And this type of "tutorial" has been made thousands of times.
Seriously, explain about the code instead of just pasting it.
Kk, I will explain more.
May 21, 2007 2:41 AM #33452
Quote from ninjapandacool. Thx for the tut man! I've been wondering how to do that for a while! :)
Sorry for the double post, btw, your welcome.
May 23, 2007 6:09 PM #33680
Copy & Pasted.